Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: chrome/browser/extensions/component_migration_helper.cc

Issue 1997453003: Fix "unused variable" warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move changes in and out to fix compile Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system_impl.h" 10 #include "chrome/browser/extensions/extension_system_impl.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
13 #include "components/prefs/pref_registry_simple.h" 13 #include "components/prefs/pref_registry_simple.h"
14 #include "components/prefs/pref_service.h" 14 #include "components/prefs/pref_service.h"
15 #include "components/prefs/scoped_user_pref_update.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 : delegate_(delegate),
26 delegate_(delegate),
27 extension_registry_(ExtensionRegistry::Get(profile)), 26 extension_registry_(ExtensionRegistry::Get(profile)),
28 pref_service_(profile->GetPrefs()), 27 pref_service_(profile->GetPrefs()),
29 extension_system_(ExtensionSystem::Get(profile)), 28 extension_system_(ExtensionSystem::Get(profile)),
30 extension_registry_observer_(this) { 29 extension_registry_observer_(this) {
31 DCHECK(delegate_); 30 DCHECK(delegate_);
32 extension_registry_observer_.Add(extension_registry_); 31 extension_registry_observer_.Add(extension_registry_);
33 } 32 }
34 33
35 ComponentMigrationHelper::~ComponentMigrationHelper() {} 34 ComponentMigrationHelper::~ComponentMigrationHelper() {}
36 35
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 std::string ComponentMigrationHelper::GetActionIdForExtensionId( 179 std::string ComponentMigrationHelper::GetActionIdForExtensionId(
181 const ExtensionId& extension_id) const { 180 const ExtensionId& extension_id) const {
182 for (const auto& i : migrated_actions_) { 181 for (const auto& i : migrated_actions_) {
183 if (i.second == extension_id) 182 if (i.second == extension_id)
184 return i.first; 183 return i.first;
185 } 184 }
186 return ""; 185 return "";
187 } 186 }
188 187
189 } // namespace extensions 188 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/component_migration_helper.h ('k') | chrome/browser/extensions/extension_action_icon_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698