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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/environment.h" | 9 #include "base/environment.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/cookie_store_factory.h" |
15 #include "content/public/browser/resource_context.h" | 16 #include "content/public/browser/resource_context.h" |
16 #include "content/public/browser/storage_partition.h" | 17 #include "content/public/browser/storage_partition.h" |
17 #include "content/public/common/content_switches.h" | 18 #include "content/public/common/content_switches.h" |
18 #include "content/shell/common/shell_switches.h" | 19 #include "content/shell/common/shell_switches.h" |
19 #include "content/shell/shell_download_manager_delegate.h" | 20 #include "content/shell/shell_download_manager_delegate.h" |
20 #include "content/shell/shell_url_request_context_getter.h" | 21 #include "content/shell/shell_url_request_context_getter.h" |
21 | 22 |
22 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
23 #include "base/base_paths_win.h" | 24 #include "base/base_paths_win.h" |
24 #elif defined(OS_LINUX) | 25 #elif defined(OS_LINUX) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 } | 112 } |
112 | 113 |
113 base::FilePath ShellBrowserContext::GetPath() const { | 114 base::FilePath ShellBrowserContext::GetPath() const { |
114 return path_; | 115 return path_; |
115 } | 116 } |
116 | 117 |
117 bool ShellBrowserContext::IsOffTheRecord() const { | 118 bool ShellBrowserContext::IsOffTheRecord() const { |
118 return off_the_record_; | 119 return off_the_record_; |
119 } | 120 } |
120 | 121 |
| 122 CookieStoreConfig ShellBrowserContext::GetCookieStoreConfig() { |
| 123 return CookieStoreConfig::InMemory(); |
| 124 } |
| 125 |
121 DownloadManagerDelegate* ShellBrowserContext::GetDownloadManagerDelegate() { | 126 DownloadManagerDelegate* ShellBrowserContext::GetDownloadManagerDelegate() { |
122 DownloadManager* manager = BrowserContext::GetDownloadManager(this); | 127 DownloadManager* manager = BrowserContext::GetDownloadManager(this); |
123 | 128 |
124 if (!download_manager_delegate_.get()) { | 129 if (!download_manager_delegate_.get()) { |
125 download_manager_delegate_ = new ShellDownloadManagerDelegate(); | 130 download_manager_delegate_ = new ShellDownloadManagerDelegate(); |
126 download_manager_delegate_->SetDownloadManager(manager); | 131 download_manager_delegate_->SetDownloadManager(manager); |
127 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 132 CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
128 if (cmd_line->HasSwitch(switches::kDumpRenderTree)) { | 133 if (cmd_line->HasSwitch(switches::kDumpRenderTree)) { |
129 download_manager_delegate_->SetDownloadBehaviorForTesting( | 134 download_manager_delegate_->SetDownloadBehaviorForTesting( |
130 path_.Append(FILE_PATH_LITERAL("downloads"))); | 135 path_.Append(FILE_PATH_LITERAL("downloads"))); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 GeolocationPermissionContext* | 211 GeolocationPermissionContext* |
207 ShellBrowserContext::GetGeolocationPermissionContext() { | 212 ShellBrowserContext::GetGeolocationPermissionContext() { |
208 return NULL; | 213 return NULL; |
209 } | 214 } |
210 | 215 |
211 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { | 216 quota::SpecialStoragePolicy* ShellBrowserContext::GetSpecialStoragePolicy() { |
212 return NULL; | 217 return NULL; |
213 } | 218 } |
214 | 219 |
215 } // namespace content | 220 } // namespace content |
OLD | NEW |