| 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 "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/environment.h" | 8 #include "base/environment.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "content/browser/download/download_manager_impl.h" | 13 #include "content/public/browser/download_manager.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/geolocation_permission_context.h" | 15 #include "content/public/browser/geolocation_permission_context.h" |
| 16 #include "content/public/browser/speech_recognition_preferences.h" | 16 #include "content/public/browser/speech_recognition_preferences.h" |
| 17 #include "content/shell/shell_browser_main_parts.h" | 17 #include "content/shell/shell_browser_main_parts.h" |
| 18 #include "content/shell/shell_download_manager_delegate.h" | 18 #include "content/shell/shell_download_manager_delegate.h" |
| 19 #include "content/shell/shell_resource_context.h" | 19 #include "content/shell/shell_resource_context.h" |
| 20 #include "content/shell/shell_url_request_context_getter.h" | 20 #include "content/shell/shell_url_request_context_getter.h" |
| 21 | 21 |
| 22 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
| 23 #include "base/base_paths_win.h" | 23 #include "base/base_paths_win.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 return path_; | 122 return path_; |
| 123 } | 123 } |
| 124 | 124 |
| 125 bool ShellBrowserContext::IsOffTheRecord() const { | 125 bool ShellBrowserContext::IsOffTheRecord() const { |
| 126 return false; | 126 return false; |
| 127 } | 127 } |
| 128 | 128 |
| 129 DownloadManager* ShellBrowserContext::GetDownloadManager() { | 129 DownloadManager* ShellBrowserContext::GetDownloadManager() { |
| 130 if (!download_manager_.get()) { | 130 if (!download_manager_.get()) { |
| 131 download_manager_delegate_ = new ShellDownloadManagerDelegate(); | 131 download_manager_delegate_ = new ShellDownloadManagerDelegate(); |
| 132 download_manager_ = new DownloadManagerImpl(download_manager_delegate_, | 132 download_manager_ = DownloadManager::Create(download_manager_delegate_, |
| 133 NULL); | 133 NULL); |
| 134 download_manager_delegate_->SetDownloadManager(download_manager_.get()); | 134 download_manager_delegate_->SetDownloadManager(download_manager_.get()); |
| 135 download_manager_->Init(this); | 135 download_manager_->Init(this); |
| 136 } | 136 } |
| 137 return download_manager_.get(); | 137 return download_manager_.get(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 140 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
| 141 if (!url_request_getter_) { | 141 if (!url_request_getter_) { |
| 142 url_request_getter_ = new ShellURLRequestContextGetter( | 142 url_request_getter_ = new ShellURLRequestContextGetter( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 bool ShellBrowserContext::DidLastSessionExitCleanly() { | 185 bool ShellBrowserContext::DidLastSessionExitCleanly() { |
| 186 return true; | 186 return true; |
| 187 } | 187 } |
| 188 | 188 |
| 189 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 189 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
| 190 return NULL; | 190 return NULL; |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace content | 193 } // namespace content |
| OLD | NEW |