| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // TODO(oshima): Remove the need to eagerly initialize the request context | 131 // TODO(oshima): Remove the need to eagerly initialize the request context |
| 132 // getter. chromeos::OnlineAttempt is illegally trying to access this | 132 // getter. chromeos::OnlineAttempt is illegally trying to access this |
| 133 // Profile member from a thread other than the UI thread, so we need to | 133 // Profile member from a thread other than the UI thread, so we need to |
| 134 // prevent a race. | 134 // prevent a race. |
| 135 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
| 136 GetRequestContext(); | 136 GetRequestContext(); |
| 137 #endif // defined(OS_CHROMEOS) | 137 #endif // defined(OS_CHROMEOS) |
| 138 | 138 |
| 139 InitHostZoomMap(); | 139 InitHostZoomMap(); |
| 140 | 140 |
| 141 // Make the chrome//extension-icon/ resource available. | |
| 142 extensions::ExtensionIconSource* icon_source = | |
| 143 new extensions::ExtensionIconSource(profile_); | |
| 144 content::URLDataSource::Add(this, icon_source); | |
| 145 | |
| 146 #if defined(ENABLE_PLUGINS) | 141 #if defined(ENABLE_PLUGINS) |
| 147 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( | 142 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( |
| 148 PluginPrefs::GetForProfile(this).get(), | 143 PluginPrefs::GetForProfile(this).get(), |
| 149 io_data_->GetResourceContextNoInit()); | 144 io_data_->GetResourceContextNoInit()); |
| 150 #endif | 145 #endif |
| 151 | 146 |
| 152 #if defined(ENABLE_EXTENSIONS) | 147 #if defined(ENABLE_EXTENSIONS) |
| 148 // Make the chrome//extension-icon/ resource available. |
| 149 extensions::ExtensionIconSource* icon_source = |
| 150 new extensions::ExtensionIconSource(profile_); |
| 151 content::URLDataSource::Add(this, icon_source); |
| 152 |
| 153 BrowserThread::PostTask( | 153 BrowserThread::PostTask( |
| 154 BrowserThread::IO, FROM_HERE, | 154 BrowserThread::IO, FROM_HERE, |
| 155 base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this)); | 155 base::Bind(&NotifyOTRProfileCreatedOnIOThread, profile_, this)); |
| 156 #endif | 156 #endif |
| 157 } | 157 } |
| 158 | 158 |
| 159 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { | 159 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { |
| 160 MaybeSendDestroyedNotification(); | 160 MaybeSendDestroyedNotification(); |
| 161 | 161 |
| 162 #if defined(ENABLE_PLUGINS) | 162 #if defined(ENABLE_PLUGINS) |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { | 524 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { |
| 525 #if defined(OS_CHROMEOS) | 525 #if defined(OS_CHROMEOS) |
| 526 if (chromeos::ProfileHelper::IsSigninProfile(this)) { | 526 if (chromeos::ProfileHelper::IsSigninProfile(this)) { |
| 527 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 527 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 528 g_browser_process->local_state()); | 528 g_browser_process->local_state()); |
| 529 } | 529 } |
| 530 #endif // defined(OS_CHROMEOS) | 530 #endif // defined(OS_CHROMEOS) |
| 531 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( | 531 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( |
| 532 GetPrefs(), g_browser_process->local_state()); | 532 GetPrefs(), g_browser_process->local_state()); |
| 533 } | 533 } |
| OLD | NEW |