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

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

Issue 6542013: Get rid of browser_prefs::RegisterAllPrefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix metrics_log_unittest.cc Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/testing_profile.h" 5 #include "chrome/test/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 15 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
16 #include "chrome/browser/bookmarks/bookmark_model.h" 16 #include "chrome/browser/bookmarks/bookmark_model.h"
17 #include "chrome/browser/browser_thread.h" 17 #include "chrome/browser/browser_thread.h"
18 #include "chrome/browser/content_settings/host_content_settings_map.h" 18 #include "chrome/browser/content_settings/host_content_settings_map.h"
19 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 19 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
20 #include "chrome/browser/dom_ui/ntp_resource_cache.h" 20 #include "chrome/browser/dom_ui/ntp_resource_cache.h"
21 #include "chrome/browser/extensions/extension_pref_value_map.h"
21 #include "chrome/browser/extensions/extension_service.h" 22 #include "chrome/browser/extensions/extension_service.h"
22 #include "chrome/browser/extensions/extension_pref_value_map.h"
23 #include "chrome/browser/favicon_service.h" 23 #include "chrome/browser/favicon_service.h"
24 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 24 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
25 #include "chrome/browser/geolocation/geolocation_permission_context.h" 25 #include "chrome/browser/geolocation/geolocation_permission_context.h"
26 #include "chrome/browser/history/history.h" 26 #include "chrome/browser/history/history.h"
27 #include "chrome/browser/history/history_backend.h" 27 #include "chrome/browser/history/history_backend.h"
28 #include "chrome/browser/history/top_sites.h" 28 #include "chrome/browser/history/top_sites.h"
29 #include "chrome/browser/in_process_webkit/webkit_context.h" 29 #include "chrome/browser/in_process_webkit/webkit_context.h"
30 #include "chrome/browser/net/gaia/token_service.h" 30 #include "chrome/browser/net/gaia/token_service.h"
31 #include "chrome/browser/net/pref_proxy_config_service.h" 31 #include "chrome/browser/net/pref_proxy_config_service.h"
32 #include "chrome/browser/notifications/desktop_notification_service.h" 32 #include "chrome/browser/notifications/desktop_notification_service.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 void TestingProfile::SetPrefService(PrefService* prefs) { 490 void TestingProfile::SetPrefService(PrefService* prefs) {
491 DCHECK(!prefs_.get()); 491 DCHECK(!prefs_.get());
492 prefs_.reset(prefs); 492 prefs_.reset(prefs);
493 } 493 }
494 494
495 void TestingProfile::CreateTestingPrefService() { 495 void TestingProfile::CreateTestingPrefService() {
496 DCHECK(!prefs_.get()); 496 DCHECK(!prefs_.get());
497 testing_prefs_ = new TestingPrefService(); 497 testing_prefs_ = new TestingPrefService();
498 prefs_.reset(testing_prefs_); 498 prefs_.reset(testing_prefs_);
499 Profile::RegisterUserPrefs(prefs_.get()); 499 Profile::RegisterUserPrefs(prefs_.get());
500 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); 500 browser::RegisterUserPrefs(prefs_.get());
501 } 501 }
502 502
503 PrefService* TestingProfile::GetPrefs() { 503 PrefService* TestingProfile::GetPrefs() {
504 if (!prefs_.get()) { 504 if (!prefs_.get()) {
505 CreateTestingPrefService(); 505 CreateTestingPrefService();
506 } 506 }
507 return prefs_.get(); 507 return prefs_.get();
508 } 508 }
509 509
510 TemplateURLModel* TestingProfile::GetTemplateURLModel() { 510 TemplateURLModel* TestingProfile::GetTemplateURLModel() {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 } 783 }
784 784
785 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) 785 DerivedTestingProfile::DerivedTestingProfile(Profile* profile)
786 : original_profile_(profile) {} 786 : original_profile_(profile) {}
787 787
788 DerivedTestingProfile::~DerivedTestingProfile() {} 788 DerivedTestingProfile::~DerivedTestingProfile() {}
789 789
790 ProfileId DerivedTestingProfile::GetRuntimeId() { 790 ProfileId DerivedTestingProfile::GetRuntimeId() {
791 return original_profile_->GetRuntimeId(); 791 return original_profile_->GetRuntimeId();
792 } 792 }
OLDNEW
« chrome/test/testing_browser_process.h ('K') | « chrome/test/testing_browser_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698