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