| 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/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { | 256 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { |
| 257 return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 257 return GetDefaultStoragePartition(this)->GetURLRequestContext(); |
| 258 } | 258 } |
| 259 | 259 |
| 260 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( | 260 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( |
| 261 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 261 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 262 blob_protocol_handler, | 262 blob_protocol_handler, |
| 263 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 263 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 264 file_system_protocol_handler, | 264 file_system_protocol_handler, |
| 265 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 265 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 266 developer_protocol_handler, | |
| 267 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 268 chrome_protocol_handler, | 266 chrome_protocol_handler, |
| 269 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 267 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 270 chrome_devtools_protocol_handler) { | 268 chrome_devtools_protocol_handler) { |
| 271 return io_data_.CreateMainRequestContextGetter(blob_protocol_handler.Pass(), | 269 return io_data_.CreateMainRequestContextGetter(blob_protocol_handler.Pass(), |
| 272 file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(), | 270 file_system_protocol_handler.Pass(), chrome_protocol_handler.Pass(), |
| 273 chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass()); | 271 chrome_devtools_protocol_handler.Pass()); |
| 274 } | 272 } |
| 275 | 273 |
| 276 net::URLRequestContextGetter* | 274 net::URLRequestContextGetter* |
| 277 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( | 275 OffTheRecordProfileImpl::GetRequestContextForRenderProcess( |
| 278 int renderer_child_id) { | 276 int renderer_child_id) { |
| 279 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( | 277 content::RenderProcessHost* rph = content::RenderProcessHost::FromID( |
| 280 renderer_child_id); | 278 renderer_child_id); |
| 281 return rph->GetStoragePartition()->GetURLRequestContext(); | 279 return rph->GetStoragePartition()->GetURLRequestContext(); |
| 282 } | 280 } |
| 283 | 281 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 308 | 306 |
| 309 net::URLRequestContextGetter* | 307 net::URLRequestContextGetter* |
| 310 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 308 OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |
| 311 const base::FilePath& partition_path, | 309 const base::FilePath& partition_path, |
| 312 bool in_memory, | 310 bool in_memory, |
| 313 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 311 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 314 blob_protocol_handler, | 312 blob_protocol_handler, |
| 315 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 313 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 316 file_system_protocol_handler, | 314 file_system_protocol_handler, |
| 317 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 315 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 318 developer_protocol_handler, | |
| 319 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 320 chrome_protocol_handler, | 316 chrome_protocol_handler, |
| 321 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 317 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 322 chrome_devtools_protocol_handler) { | 318 chrome_devtools_protocol_handler) { |
| 323 return io_data_.CreateIsolatedAppRequestContextGetter( | 319 return io_data_.CreateIsolatedAppRequestContextGetter( |
| 324 partition_path, in_memory, blob_protocol_handler.Pass(), | 320 partition_path, in_memory, blob_protocol_handler.Pass(), |
| 325 file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(), | 321 file_system_protocol_handler.Pass(), chrome_protocol_handler.Pass(), |
| 326 chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass()); | 322 chrome_devtools_protocol_handler.Pass()); |
| 327 } | 323 } |
| 328 | 324 |
| 329 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { | 325 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { |
| 330 return io_data_.GetResourceContext(); | 326 return io_data_.GetResourceContext(); |
| 331 } | 327 } |
| 332 | 328 |
| 333 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { | 329 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { |
| 334 return profile_->GetSSLConfigService(); | 330 return profile_->GetSSLConfigService(); |
| 335 } | 331 } |
| 336 | 332 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 void OffTheRecordProfileImpl::OnZoomLevelChanged(const std::string& host) { | 490 void OffTheRecordProfileImpl::OnZoomLevelChanged(const std::string& host) { |
| 495 if (host.empty()) | 491 if (host.empty()) |
| 496 return; | 492 return; |
| 497 | 493 |
| 498 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); | 494 HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); |
| 499 HostZoomMap* parent_host_zoom_map = | 495 HostZoomMap* parent_host_zoom_map = |
| 500 HostZoomMap::GetForBrowserContext(profile_); | 496 HostZoomMap::GetForBrowserContext(profile_); |
| 501 double level = parent_host_zoom_map->GetZoomLevel(host); | 497 double level = parent_host_zoom_map->GetZoomLevel(host); |
| 502 host_zoom_map->SetZoomLevel(host, level); | 498 host_zoom_map->SetZoomLevel(host, level); |
| 503 } | 499 } |
| OLD | NEW |