| OLD | NEW |
| 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/off_the_record_profile_impl.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 set_is_guest_profile( | 143 set_is_guest_profile( |
| 144 profile_->GetPath() == ProfileManager::GetGuestProfilePath()); | 144 profile_->GetPath() == ProfileManager::GetGuestProfilePath()); |
| 145 | 145 |
| 146 // Guest profiles may always be OTR. Check IncognitoModePrefs otherwise. | 146 // Guest profiles may always be OTR. Check IncognitoModePrefs otherwise. |
| 147 DCHECK(profile_->IsGuestSession() || | 147 DCHECK(profile_->IsGuestSession() || |
| 148 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) != | 148 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()) != |
| 149 IncognitoModePrefs::DISABLED); | 149 IncognitoModePrefs::DISABLED); |
| 150 | 150 |
| 151 TrackZoomLevelsFromParent(); | 151 TrackZoomLevelsFromParent(); |
| 152 | 152 |
| 153 DCHECK(!net_pref_observer_); |
| 154 NetPrefObserver::UpdateNetParamsCallback update_net_params_callback = |
| 155 base::Bind(&OffTheRecordProfileIOData::Handle::UpdateNetParamsOnIOThread, |
| 156 base::Unretained(io_data_.get())); |
| 157 net_pref_observer_ = |
| 158 base::MakeUnique<NetPrefObserver>(prefs_, update_net_params_callback); |
| 159 |
| 153 #if BUILDFLAG(ENABLE_PLUGINS) | 160 #if BUILDFLAG(ENABLE_PLUGINS) |
| 154 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 161 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
| 155 this, io_data_->GetResourceContextNoInit()); | 162 this, io_data_->GetResourceContextNoInit()); |
| 156 #endif | 163 #endif |
| 157 | 164 |
| 158 #if BUILDFLAG(ENABLE_EXTENSIONS) | 165 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 159 // Make the chrome//extension-icon/ resource available. | 166 // Make the chrome//extension-icon/ resource available. |
| 160 extensions::ExtensionIconSource* icon_source = | 167 extensions::ExtensionIconSource* icon_source = |
| 161 new extensions::ExtensionIconSource(profile_); | 168 new extensions::ExtensionIconSource(profile_); |
| 162 content::URLDataSource::Add(this, icon_source); | 169 content::URLDataSource::Add(this, icon_source); |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 561 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 555 #if defined(OS_CHROMEOS) | 562 #if defined(OS_CHROMEOS) |
| 556 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 563 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 557 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 564 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 558 g_browser_process->local_state()); | 565 g_browser_process->local_state()); |
| 559 } | 566 } |
| 560 #endif // defined(OS_CHROMEOS) | 567 #endif // defined(OS_CHROMEOS) |
| 561 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 568 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 562 GetPrefs(), g_browser_process->local_state()); | 569 GetPrefs(), g_browser_process->local_state()); |
| 563 } | 570 } |
| OLD | NEW |