| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/shell/shell_browser_context.h" | 5 #include "content/shell/shell_browser_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/threading/thread.h" |
| 11 #include "content/browser/appcache/chrome_appcache_service.h" | 12 #include "content/browser/appcache/chrome_appcache_service.h" |
| 12 #include "content/browser/chrome_blob_storage_context.h" | 13 #include "content/browser/chrome_blob_storage_context.h" |
| 13 #include "content/browser/download/download_id_factory.h" | 14 #include "content/browser/download/download_id_factory.h" |
| 14 #include "content/browser/download/download_manager_impl.h" | 15 #include "content/browser/download/download_manager_impl.h" |
| 15 #include "content/browser/download/download_status_updater.h" | 16 #include "content/browser/download/download_status_updater.h" |
| 16 #include "content/browser/file_system/browser_file_system_helper.h" | 17 #include "content/browser/file_system/browser_file_system_helper.h" |
| 17 #include "content/browser/geolocation/geolocation_permission_context.h" | 18 #include "content/browser/geolocation/geolocation_permission_context.h" |
| 18 #include "content/browser/host_zoom_map.h" | 19 #include "content/browser/host_zoom_map.h" |
| 19 #include "content/browser/in_process_webkit/webkit_context.h" | 20 #include "content/browser/in_process_webkit/webkit_context.h" |
| 20 #include "content/browser/speech/speech_input_preferences.h" | 21 #include "content/browser/speech/speech_input_preferences.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 download_manager_delegate_->SetDownloadManager(download_manager_.get()); | 134 download_manager_delegate_->SetDownloadManager(download_manager_.get()); |
| 134 download_manager_->Init(this); | 135 download_manager_->Init(this); |
| 135 } | 136 } |
| 136 return download_manager_.get(); | 137 return download_manager_.get(); |
| 137 } | 138 } |
| 138 | 139 |
| 139 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 140 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
| 140 if (!url_request_getter_) { | 141 if (!url_request_getter_) { |
| 141 url_request_getter_ = new ShellURLRequestContextGetter( | 142 url_request_getter_ = new ShellURLRequestContextGetter( |
| 142 GetPath(), | 143 GetPath(), |
| 143 shell_main_parts_->io_thread()->message_loop(), | 144 BrowserThread::UnsafeGetBrowserThread( |
| 144 shell_main_parts_->file_thread()->message_loop()); | 145 BrowserThread::IO)->message_loop(), |
| 146 BrowserThread::UnsafeGetBrowserThread( |
| 147 BrowserThread::FILE)->message_loop()); |
| 145 } | 148 } |
| 146 return url_request_getter_; | 149 return url_request_getter_; |
| 147 } | 150 } |
| 148 | 151 |
| 149 net::URLRequestContextGetter* | 152 net::URLRequestContextGetter* |
| 150 ShellBrowserContext::GetRequestContextForRenderProcess( | 153 ShellBrowserContext::GetRequestContextForRenderProcess( |
| 151 int renderer_child_id) { | 154 int renderer_child_id) { |
| 152 return GetRequestContext(); | 155 return GetRequestContext(); |
| 153 } | 156 } |
| 154 | 157 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 base::Bind( | 257 base::Bind( |
| 255 &ChromeAppCacheService::InitializeOnIOThread, | 258 &ChromeAppCacheService::InitializeOnIOThread, |
| 256 appcache_service_.get(), | 259 appcache_service_.get(), |
| 257 IsOffTheRecord() | 260 IsOffTheRecord() |
| 258 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), | 261 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), |
| 259 &GetResourceContext(), | 262 &GetResourceContext(), |
| 260 special_storage_policy)); | 263 special_storage_policy)); |
| 261 } | 264 } |
| 262 | 265 |
| 263 } // namespace content | 266 } // namespace content |
| OLD | NEW |