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

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

Issue 550053003: Fix crash of ExtensionManagement in guest mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_management.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extension_management.h" 5 #include "chrome/browser/extensions/extension_management.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "chrome/browser/extensions/external_provider_impl.h" 11 #include "chrome/browser/extensions/external_provider_impl.h"
12 #include "chrome/browser/extensions/standard_management_policy_provider.h" 12 #include "chrome/browser/extensions/standard_management_policy_provider.h"
13 #include "chrome/browser/profiles/incognito_helpers.h"
13 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
14 #include "components/crx_file/id_util.h" 15 #include "components/crx_file/id_util.h"
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" 16 #include "components/keyed_service/content/browser_context_dependency_manager.h"
16 #include "extensions/browser/pref_names.h" 17 #include "extensions/browser/pref_names.h"
17 #include "extensions/common/url_pattern.h" 18 #include "extensions/common/url_pattern.h"
18 19
19 namespace extensions { 20 namespace extensions {
20 21
21 void ExtensionManagement::IndividualSettings::Reset() { 22 void ExtensionManagement::IndividualSettings::Reset() {
22 installation_mode = ExtensionManagement::INSTALLATION_ALLOWED; 23 installation_mode = ExtensionManagement::INSTALLATION_ALLOWED;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 244
244 ExtensionManagementFactory::~ExtensionManagementFactory() { 245 ExtensionManagementFactory::~ExtensionManagementFactory() {
245 } 246 }
246 247
247 KeyedService* ExtensionManagementFactory::BuildServiceInstanceFor( 248 KeyedService* ExtensionManagementFactory::BuildServiceInstanceFor(
248 content::BrowserContext* context) const { 249 content::BrowserContext* context) const {
249 return new ExtensionManagement( 250 return new ExtensionManagement(
250 Profile::FromBrowserContext(context)->GetPrefs()); 251 Profile::FromBrowserContext(context)->GetPrefs());
251 } 252 }
252 253
254 content::BrowserContext* ExtensionManagementFactory::GetBrowserContextToUse(
255 content::BrowserContext* context) const {
256 return chrome::GetBrowserContextRedirectedInIncognito(context);
257 }
258
253 } // namespace extensions 259 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698