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

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

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/prefs/pref_service.h" 6 #include "base/prefs/pref_service.h"
7 #include "chrome/browser/extensions/extension_pref_value_map.h" 7 #include "chrome/browser/extensions/extension_pref_value_map.h"
8 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" 8 #include "chrome/browser/extensions/extension_pref_value_map_factory.h"
9 #include "chrome/browser/extensions/extension_prefs.h" 9 #include "chrome/browser/extensions/extension_prefs.h"
10 #include "chrome/browser/extensions/extension_prefs_factory.h" 10 #include "chrome/browser/extensions/extension_prefs_factory.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 BrowserContextKeyedService* ExtensionPrefsFactory::BuildServiceInstanceFor( 46 BrowserContextKeyedService* ExtensionPrefsFactory::BuildServiceInstanceFor(
47 content::BrowserContext* context) const { 47 content::BrowserContext* context) const {
48 Profile* profile = Profile::FromBrowserContext(context); 48 Profile* profile = Profile::FromBrowserContext(context);
49 bool extensions_disabled = 49 bool extensions_disabled =
50 profile->GetPrefs()->GetBoolean(prefs::kDisableExtensions) || 50 profile->GetPrefs()->GetBoolean(prefs::kDisableExtensions) ||
51 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions); 51 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableExtensions);
52 return ExtensionPrefs::Create( 52 return ExtensionPrefs::Create(
53 profile->GetPrefs(), 53 profile->GetPrefs(),
54 profile->GetPath().AppendASCII(extensions::kInstallDirectoryName), 54 profile->GetPath().AppendASCII(filenames::kInstallDirectoryName),
55 ExtensionPrefValueMapFactory::GetForProfile(profile), 55 ExtensionPrefValueMapFactory::GetForProfile(profile),
56 extensions_disabled); 56 extensions_disabled);
57 } 57 }
58 58
59 content::BrowserContext* ExtensionPrefsFactory::GetBrowserContextToUse( 59 content::BrowserContext* ExtensionPrefsFactory::GetBrowserContextToUse(
60 content::BrowserContext* context) const { 60 content::BrowserContext* context) const {
61 return chrome::GetBrowserContextRedirectedInIncognito(context); 61 return chrome::GetBrowserContextRedirectedInIncognito(context);
62 } 62 }
63 63
64 } // namespace extensions 64 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698