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

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

Issue 1251323003: Cleanup: give ChromeAppSorting a BrowserContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.cc ('k') | extensions/browser/app_sorting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test_extension_system.h" 5 #include "chrome/browser/extensions/test_extension_system.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/extensions/blacklist.h" 9 #include "chrome/browser/extensions/blacklist.h"
10 #include "chrome/browser/extensions/extension_management.h" 10 #include "chrome/browser/extensions/extension_management.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 command_line && command_line->HasSwitch(switches::kDisableExtensions); 51 command_line && command_line->HasSwitch(switches::kDisableExtensions);
52 52
53 // Note that the GetPrefs() creates a TestingPrefService, therefore 53 // Note that the GetPrefs() creates a TestingPrefService, therefore
54 // the extension controlled pref values set in ExtensionPrefs 54 // the extension controlled pref values set in ExtensionPrefs
55 // are not reflected in the pref service. One would need to 55 // are not reflected in the pref service. One would need to
56 // inject a new ExtensionPrefStore(extension_pref_value_map, false). 56 // inject a new ExtensionPrefStore(extension_pref_value_map, false).
57 57
58 return make_scoped_ptr(ExtensionPrefs::Create( 58 return make_scoped_ptr(ExtensionPrefs::Create(
59 profile_->GetPrefs(), install_directory, 59 profile_->GetPrefs(), install_directory,
60 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_), 60 ExtensionPrefValueMapFactory::GetForBrowserContext(profile_),
61 ExtensionsBrowserClient::Get()->CreateAppSorting().Pass(), 61 ExtensionsBrowserClient::Get()->CreateAppSorting(profile_).Pass(),
62 extensions_disabled, std::vector<ExtensionPrefsObserver*>())); 62 extensions_disabled, std::vector<ExtensionPrefsObserver*>()));
63 } 63 }
64 64
65 ExtensionService* TestExtensionSystem::CreateExtensionService( 65 ExtensionService* TestExtensionSystem::CreateExtensionService(
66 const base::CommandLine* command_line, 66 const base::CommandLine* command_line,
67 const base::FilePath& install_directory, 67 const base::FilePath& install_directory,
68 bool autoupdate_enabled) { 68 bool autoupdate_enabled) {
69 // The ownership of |value_store_| is immediately transferred to state_store_, 69 // The ownership of |value_store_| is immediately transferred to state_store_,
70 // but we keep a naked pointer to the TestingValueStore. 70 // but we keep a naked pointer to the TestingValueStore.
71 scoped_ptr<TestingValueStore> value_store(new TestingValueStore()); 71 scoped_ptr<TestingValueStore> value_store(new TestingValueStore());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 } 137 }
138 138
139 // static 139 // static
140 scoped_ptr<KeyedService> TestExtensionSystem::Build( 140 scoped_ptr<KeyedService> TestExtensionSystem::Build(
141 content::BrowserContext* profile) { 141 content::BrowserContext* profile) {
142 return make_scoped_ptr( 142 return make_scoped_ptr(
143 new TestExtensionSystem(static_cast<Profile*>(profile))); 143 new TestExtensionSystem(static_cast<Profile*>(profile)));
144 } 144 }
145 145
146 } // namespace extensions 146 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.cc ('k') | extensions/browser/app_sorting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698