| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  254 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { |  254 DownloadManagerDelegate* OffTheRecordProfileImpl::GetDownloadManagerDelegate() { | 
|  255   return DownloadServiceFactory::GetForProfile(this)-> |  255   return DownloadServiceFactory::GetForProfile(this)-> | 
|  256       GetDownloadManagerDelegate(); |  256       GetDownloadManagerDelegate(); | 
|  257 } |  257 } | 
|  258  |  258  | 
|  259 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { |  259 net::URLRequestContextGetter* OffTheRecordProfileImpl::GetRequestContext() { | 
|  260   return GetDefaultStoragePartition(this)->GetURLRequestContext(); |  260   return GetDefaultStoragePartition(this)->GetURLRequestContext(); | 
|  261 } |  261 } | 
|  262  |  262  | 
|  263 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( |  263 net::URLRequestContextGetter* OffTheRecordProfileImpl::CreateRequestContext( | 
|  264     scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  264     content::ProtocolHandlerMap* protocol_handlers) { | 
|  265         blob_protocol_handler, |  265   return io_data_.CreateMainRequestContextGetter(protocol_handlers); | 
|  266     scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  267         file_system_protocol_handler, |  | 
|  268     scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  269         developer_protocol_handler, |  | 
|  270     scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  271         chrome_protocol_handler, |  | 
|  272     scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  273         chrome_devtools_protocol_handler) { |  | 
|  274   return io_data_.CreateMainRequestContextGetter(blob_protocol_handler.Pass(), |  | 
|  275       file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(), |  | 
|  276       chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass()); |  | 
|  277 } |  266 } | 
|  278  |  267  | 
|  279 net::URLRequestContextGetter* |  268 net::URLRequestContextGetter* | 
|  280     OffTheRecordProfileImpl::GetRequestContextForRenderProcess( |  269     OffTheRecordProfileImpl::GetRequestContextForRenderProcess( | 
|  281         int renderer_child_id) { |  270         int renderer_child_id) { | 
|  282   content::RenderProcessHost* rph = content::RenderProcessHost::FromID( |  271   content::RenderProcessHost* rph = content::RenderProcessHost::FromID( | 
|  283       renderer_child_id); |  272       renderer_child_id); | 
|  284   return rph->GetStoragePartition()->GetURLRequestContext(); |  273   return rph->GetStoragePartition()->GetURLRequestContext(); | 
|  285 } |  274 } | 
|  286  |  275  | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
|  306  |  295  | 
|  307 net::URLRequestContextGetter* |  296 net::URLRequestContextGetter* | 
|  308     OffTheRecordProfileImpl::GetRequestContextForExtensions() { |  297     OffTheRecordProfileImpl::GetRequestContextForExtensions() { | 
|  309   return io_data_.GetExtensionsRequestContextGetter(); |  298   return io_data_.GetExtensionsRequestContextGetter(); | 
|  310 } |  299 } | 
|  311  |  300  | 
|  312 net::URLRequestContextGetter* |  301 net::URLRequestContextGetter* | 
|  313     OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( |  302     OffTheRecordProfileImpl::CreateRequestContextForStoragePartition( | 
|  314         const base::FilePath& partition_path, |  303         const base::FilePath& partition_path, | 
|  315         bool in_memory, |  304         bool in_memory, | 
|  316         scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  305         content::ProtocolHandlerMap* protocol_handlers) { | 
|  317             blob_protocol_handler, |  | 
|  318         scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  319             file_system_protocol_handler, |  | 
|  320         scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  321             developer_protocol_handler, |  | 
|  322         scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  323             chrome_protocol_handler, |  | 
|  324         scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |  | 
|  325             chrome_devtools_protocol_handler) { |  | 
|  326   return io_data_.CreateIsolatedAppRequestContextGetter( |  306   return io_data_.CreateIsolatedAppRequestContextGetter( | 
|  327       partition_path, in_memory, blob_protocol_handler.Pass(), |  307       partition_path, in_memory, protocol_handlers); | 
|  328       file_system_protocol_handler.Pass(), developer_protocol_handler.Pass(), |  | 
|  329       chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass()); |  | 
|  330 } |  308 } | 
|  331  |  309  | 
|  332 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { |  310 content::ResourceContext* OffTheRecordProfileImpl::GetResourceContext() { | 
|  333   return io_data_.GetResourceContext(); |  311   return io_data_.GetResourceContext(); | 
|  334 } |  312 } | 
|  335  |  313  | 
|  336 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { |  314 net::SSLConfigService* OffTheRecordProfileImpl::GetSSLConfigService() { | 
|  337   return profile_->GetSSLConfigService(); |  315   return profile_->GetSSLConfigService(); | 
|  338 } |  316 } | 
|  339  |  317  | 
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  497 void OffTheRecordProfileImpl::OnZoomLevelChanged(const std::string& host) { |  475 void OffTheRecordProfileImpl::OnZoomLevelChanged(const std::string& host) { | 
|  498   if (host.empty()) |  476   if (host.empty()) | 
|  499     return; |  477     return; | 
|  500  |  478  | 
|  501   HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); |  479   HostZoomMap* host_zoom_map = HostZoomMap::GetForBrowserContext(this); | 
|  502   HostZoomMap* parent_host_zoom_map = |  480   HostZoomMap* parent_host_zoom_map = | 
|  503       HostZoomMap::GetForBrowserContext(profile_); |  481       HostZoomMap::GetForBrowserContext(profile_); | 
|  504   double level = parent_host_zoom_map->GetZoomLevel(host); |  482   double level = parent_host_zoom_map->GetZoomLevel(host); | 
|  505   host_zoom_map->SetZoomLevel(host, level); |  483   host_zoom_map->SetZoomLevel(host, level); | 
|  506 } |  484 } | 
| OLD | NEW |