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" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 download_manager_delegate_->SetDownloadManager(download_manager_.get()); | 135 download_manager_delegate_->SetDownloadManager(download_manager_.get()); |
136 download_manager_->Init(this); | 136 download_manager_->Init(this); |
137 } | 137 } |
138 return download_manager_.get(); | 138 return download_manager_.get(); |
139 } | 139 } |
140 | 140 |
141 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 141 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
142 if (!url_request_getter_) { | 142 if (!url_request_getter_) { |
143 url_request_getter_ = new ShellURLRequestContextGetter( | 143 url_request_getter_ = new ShellURLRequestContextGetter( |
144 GetPath(), | 144 GetPath(), |
145 BrowserThread::UnsafeGetBrowserThread( | 145 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), |
146 BrowserThread::IO)->message_loop(), | 146 BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE)); |
147 BrowserThread::UnsafeGetBrowserThread( | |
148 BrowserThread::FILE)->message_loop()); | |
149 } | 147 } |
150 return url_request_getter_; | 148 return url_request_getter_; |
151 } | 149 } |
152 | 150 |
153 net::URLRequestContextGetter* | 151 net::URLRequestContextGetter* |
154 ShellBrowserContext::GetRequestContextForRenderProcess( | 152 ShellBrowserContext::GetRequestContextForRenderProcess( |
155 int renderer_child_id) { | 153 int renderer_child_id) { |
156 return GetRequestContext(); | 154 return GetRequestContext(); |
157 } | 155 } |
158 | 156 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 base::Bind( | 256 base::Bind( |
259 &ChromeAppCacheService::InitializeOnIOThread, | 257 &ChromeAppCacheService::InitializeOnIOThread, |
260 appcache_service_.get(), | 258 appcache_service_.get(), |
261 IsOffTheRecord() | 259 IsOffTheRecord() |
262 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), | 260 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), |
263 &GetResourceContext(), | 261 &GetResourceContext(), |
264 special_storage_policy)); | 262 special_storage_policy)); |
265 } | 263 } |
266 | 264 |
267 } // namespace content | 265 } // namespace content |
OLD | NEW |