| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 BrowserThread::IO, FROM_HERE, | 185 BrowserThread::IO, FROM_HERE, |
| 186 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); | 186 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); |
| 187 #endif | 187 #endif |
| 188 | 188 |
| 189 if (pref_proxy_config_tracker_) | 189 if (pref_proxy_config_tracker_) |
| 190 pref_proxy_config_tracker_->DetachFromPrefService(); | 190 pref_proxy_config_tracker_->DetachFromPrefService(); |
| 191 | 191 |
| 192 // Clears any data the network stack contains that may be related to the | 192 // Clears any data the network stack contains that may be related to the |
| 193 // OTR session. | 193 // OTR session. |
| 194 g_browser_process->io_thread()->ChangedToOnTheRecord(); | 194 g_browser_process->io_thread()->ChangedToOnTheRecord(); |
| 195 |
| 196 // This must be called before ProfileIOData::ShutdownOnUIThread but after |
| 197 // other profile-related destroy notifications are dispatched. |
| 198 ShutdownStoragePartitions(); |
| 195 } | 199 } |
| 196 | 200 |
| 197 void OffTheRecordProfileImpl::InitIoData() { | 201 void OffTheRecordProfileImpl::InitIoData() { |
| 198 io_data_.reset(new OffTheRecordProfileIOData::Handle(this)); | 202 io_data_.reset(new OffTheRecordProfileIOData::Handle(this)); |
| 199 } | 203 } |
| 200 | 204 |
| 201 void OffTheRecordProfileImpl::TrackZoomLevelsFromParent() { | 205 void OffTheRecordProfileImpl::TrackZoomLevelsFromParent() { |
| 202 DCHECK_NE(INCOGNITO_PROFILE, profile_->GetProfileType()); | 206 DCHECK_NE(INCOGNITO_PROFILE, profile_->GetProfileType()); |
| 203 | 207 |
| 204 // Here we only want to use zoom levels stored in the main-context's default | 208 // Here we only want to use zoom levels stored in the main-context's default |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 552 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 549 #if defined(OS_CHROMEOS) | 553 #if defined(OS_CHROMEOS) |
| 550 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 554 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 551 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 555 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 552 g_browser_process->local_state()); | 556 g_browser_process->local_state()); |
| 553 } | 557 } |
| 554 #endif // defined(OS_CHROMEOS) | 558 #endif // defined(OS_CHROMEOS) |
| 555 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 559 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 556 GetPrefs(), g_browser_process->local_state()); | 560 GetPrefs(), g_browser_process->local_state()); |
| 557 } | 561 } |
| OLD | NEW |