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

Side by Side Diff: chrome/test/testing_profile.h

Issue 2823037: Add an ExtensionPrefStore, layered between the user prefs nad the managed pre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_TEST_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_
6 #define CHROME_TEST_TESTING_PROFILE_H_ 6 #define CHROME_TEST_TESTING_PROFILE_H_
7 7
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return web_data_service_.get(); 147 return web_data_service_.get();
148 } 148 }
149 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) { 149 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) {
150 return NULL; 150 return NULL;
151 } 151 }
152 virtual PrefService* GetPrefs() { 152 virtual PrefService* GetPrefs() {
153 if (!prefs_.get()) { 153 if (!prefs_.get()) {
154 FilePath prefs_filename = 154 FilePath prefs_filename =
155 path_.Append(FILE_PATH_LITERAL("TestPreferences")); 155 path_.Append(FILE_PATH_LITERAL("TestPreferences"));
156 156
157 prefs_.reset(new PrefService(new PrefValueStore( 157 prefs_.reset(PrefService::CreateUserPrefService(prefs_filename));
158 NULL, /* no managed preference values */
159 new JsonPrefStore( /* user defined preference values */
160 prefs_filename,
161 ChromeThread::GetMessageLoopProxyForThread(ChromeThread::FILE)),
162 NULL /* no suggested preference values */)));
163 Profile::RegisterUserPrefs(prefs_.get()); 158 Profile::RegisterUserPrefs(prefs_.get());
164 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); 159 browser::RegisterAllPrefs(prefs_.get(), prefs_.get());
165 } 160 }
166 return prefs_.get(); 161 return prefs_.get();
167 } 162 }
168 virtual TemplateURLModel* GetTemplateURLModel() { 163 virtual TemplateURLModel* GetTemplateURLModel() {
169 return template_url_model_.get(); 164 return template_url_model_.get();
170 } 165 }
171 virtual TemplateURLFetcher* GetTemplateURLFetcher() { return NULL; } 166 virtual TemplateURLFetcher* GetTemplateURLFetcher() { return NULL; }
172 virtual history::TopSites* GetTopSites() { return NULL; } 167 virtual history::TopSites* GetTopSites() { return NULL; }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 381
387 virtual ProfileId GetRuntimeId() { 382 virtual ProfileId GetRuntimeId() {
388 return original_profile_->GetRuntimeId(); 383 return original_profile_->GetRuntimeId();
389 } 384 }
390 385
391 protected: 386 protected:
392 Profile* original_profile_; 387 Profile* original_profile_;
393 }; 388 };
394 389
395 #endif // CHROME_TEST_TESTING_PROFILE_H_ 390 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/test/reliability/page_load_test.cc ('k') | chrome_frame/test/reliability/page_load_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698