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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 1332283003: Remove dependency of PrefSyncableService on PrefsTabHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable_util
Patch Set: Update PrefServiceSyncable::CreateIncognitoPrefService comment Created 5 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
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/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "chrome/browser/profiles/profile_metrics.h" 62 #include "chrome/browser/profiles/profile_metrics.h"
63 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" 63 #include "chrome/browser/push_messaging/push_messaging_service_factory.h"
64 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" 64 #include "chrome/browser/push_messaging/push_messaging_service_impl.h"
65 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 65 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
66 #include "chrome/browser/services/gcm/gcm_profile_service.h" 66 #include "chrome/browser/services/gcm/gcm_profile_service.h"
67 #include "chrome/browser/sessions/session_service_factory.h" 67 #include "chrome/browser/sessions/session_service_factory.h"
68 #include "chrome/browser/signin/signin_manager_factory.h" 68 #include "chrome/browser/signin/signin_manager_factory.h"
69 #include "chrome/browser/signin/signin_ui_util.h" 69 #include "chrome/browser/signin/signin_ui_util.h"
70 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" 70 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
71 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" 71 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h"
72 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
72 #include "chrome/browser/ui/startup/startup_browser_creator.h" 73 #include "chrome/browser/ui/startup/startup_browser_creator.h"
73 #include "chrome/common/chrome_constants.h" 74 #include "chrome/common/chrome_constants.h"
74 #include "chrome/common/chrome_paths_internal.h" 75 #include "chrome/common/chrome_paths_internal.h"
75 #include "chrome/common/chrome_switches.h" 76 #include "chrome/common/chrome_switches.h"
76 #include "chrome/common/pref_names.h" 77 #include "chrome/common/pref_names.h"
77 #include "chrome/common/url_constants.h" 78 #include "chrome/common/url_constants.h"
78 #include "chrome/grit/chromium_strings.h" 79 #include "chrome/grit/chromium_strings.h"
79 #include "components/bookmarks/browser/bookmark_model.h" 80 #include "components/bookmarks/browser/bookmark_model.h"
80 #include "components/content_settings/core/browser/cookie_settings.h" 81 #include "components/content_settings/core/browser/cookie_settings.h"
81 #include "components/content_settings/core/browser/host_content_settings_map.h" 82 #include "components/content_settings/core/browser/host_content_settings_map.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 return static_cast<ChromeZoomLevelPrefs*>( 900 return static_cast<ChromeZoomLevelPrefs*>(
900 GetDefaultStoragePartition(this)->GetZoomLevelDelegate()); 901 GetDefaultStoragePartition(this)->GetZoomLevelDelegate());
901 } 902 }
902 903
903 PrefService* ProfileImpl::GetOffTheRecordPrefs() { 904 PrefService* ProfileImpl::GetOffTheRecordPrefs() {
904 DCHECK(prefs_); 905 DCHECK(prefs_);
905 if (!otr_prefs_) { 906 if (!otr_prefs_) {
906 // The new ExtensionPrefStore is ref_counted and the new PrefService 907 // The new ExtensionPrefStore is ref_counted and the new PrefService
907 // stores a reference so that we do not leak memory here. 908 // stores a reference so that we do not leak memory here.
908 otr_prefs_.reset(prefs_->CreateIncognitoPrefService( 909 otr_prefs_.reset(prefs_->CreateIncognitoPrefService(
909 CreateExtensionPrefStore(this, true))); 910 CreateExtensionPrefStore(this, true),
911 base::Bind(&PrefsTabHelper::InitIncognitoUserPrefStore)));
910 } 912 }
911 return otr_prefs_.get(); 913 return otr_prefs_.get();
912 } 914 }
913 915
914 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext( 916 net::URLRequestContextGetter* ProfileImpl::CreateRequestContext(
915 content::ProtocolHandlerMap* protocol_handlers, 917 content::ProtocolHandlerMap* protocol_handlers,
916 content::URLRequestInterceptorScopedVector request_interceptors) { 918 content::URLRequestInterceptorScopedVector request_interceptors) {
917 return io_data_.CreateMainRequestContextGetter( 919 return io_data_.CreateMainRequestContextGetter(
918 protocol_handlers, 920 protocol_handlers,
919 request_interceptors.Pass(), 921 request_interceptors.Pass(),
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { 1282 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) {
1281 domain_reliability::DomainReliabilityService* service = 1283 domain_reliability::DomainReliabilityService* service =
1282 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> 1284 domain_reliability::DomainReliabilityServiceFactory::GetInstance()->
1283 GetForBrowserContext(this); 1285 GetForBrowserContext(this);
1284 if (!service) 1286 if (!service)
1285 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); 1287 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>();
1286 1288
1287 return service->CreateMonitor( 1289 return service->CreateMonitor(
1288 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 1290 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
1289 } 1291 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698