Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / extensions / extension_migrator.h
blob5b9de2cf7f0f3a6e149c583dab318d3c6101187e
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MIGRATOR_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MIGRATOR_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "chrome/browser/extensions/external_loader.h"
13 class Profile;
15 namespace extensions {
17 // An ExternalLoader that provides the new extension for the following
18 // scenarios:
19 // - Existing profile that has the old.
20 // - Existing profile that already has the new.
21 // Note that the old extension is not removed.
22 class ExtensionMigrator : public ExternalLoader {
23 public:
24 ExtensionMigrator(Profile* profile,
25 const std::string& old_id,
26 const std::string& new_id);
28 protected:
29 ~ExtensionMigrator() override;
31 // ExternalLoader:
32 void StartLoading() override;
34 private:
35 bool IsAppPresent(const std::string& app_id);
37 Profile* profile_;
38 const std::string old_id_;
39 const std::string new_id_;
41 DISALLOW_COPY_AND_ASSIGN(ExtensionMigrator);
44 } // namespace extensions
46 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MIGRATOR_H_