OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/extensions/component_migration_helper.h" | 5 #include "chrome/browser/extensions/component_migration_helper.h" |
6 | 6 |
7 #include "base/prefs/pref_registry_simple.h" | |
8 #include "base/prefs/pref_service.h" | |
9 #include "base/prefs/scoped_user_pref_update.h" | |
10 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
11 #include "base/values.h" | 8 #include "base/values.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/extensions/extension_system_impl.h" | 10 #include "chrome/browser/extensions/extension_system_impl.h" |
14 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/pref_names.h" | 12 #include "chrome/common/pref_names.h" |
| 13 #include "components/prefs/pref_registry_simple.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 #include "components/prefs/scoped_user_pref_update.h" |
16 #include "content/public/browser/browser_context.h" | 16 #include "content/public/browser/browser_context.h" |
17 #include "extensions/browser/extension_registry.h" | 17 #include "extensions/browser/extension_registry.h" |
18 #include "extensions/common/feature_switch.h" | 18 #include "extensions/common/feature_switch.h" |
19 | 19 |
20 namespace extensions { | 20 namespace extensions { |
21 | 21 |
22 ComponentMigrationHelper::ComponentMigrationHelper( | 22 ComponentMigrationHelper::ComponentMigrationHelper( |
23 Profile* profile, | 23 Profile* profile, |
24 ComponentActionDelegate* delegate) | 24 ComponentActionDelegate* delegate) |
25 : profile_(profile), | 25 : profile_(profile), |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 std::string ComponentMigrationHelper::GetActionIdForExtensionId( | 180 std::string ComponentMigrationHelper::GetActionIdForExtensionId( |
181 const ExtensionId& extension_id) const { | 181 const ExtensionId& extension_id) const { |
182 for (const auto& i : migrated_actions_) { | 182 for (const auto& i : migrated_actions_) { |
183 if (i.second == extension_id) | 183 if (i.second == extension_id) |
184 return i.first; | 184 return i.first; |
185 } | 185 } |
186 return ""; | 186 return ""; |
187 } | 187 } |
188 | 188 |
189 } // namespace extensions | 189 } // namespace extensions |
OLD | NEW |