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