| 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/string_split.h" | 10 #include "base/string_split.h" |
| 11 #include "content/browser/appcache/chrome_appcache_service.h" | 11 #include "content/browser/appcache/chrome_appcache_service.h" |
| 12 #include "content/browser/browser_thread.h" | 12 #include "content/browser/browser_thread.h" |
| 13 #include "content/browser/chrome_blob_storage_context.h" | 13 #include "content/browser/chrome_blob_storage_context.h" |
| 14 #include "content/browser/download/download_manager.h" | 14 #include "content/browser/download/download_manager.h" |
| 15 #include "content/browser/download/download_status_updater.h" | 15 #include "content/browser/download/download_status_updater.h" |
| 16 #include "content/browser/download/mock_download_manager_delegate.h" | 16 #include "content/browser/download/mock_download_manager_delegate.h" |
| 17 #include "content/browser/file_system/browser_file_system_helper.h" | 17 #include "content/browser/file_system/browser_file_system_helper.h" |
| 18 #include "content/browser/geolocation/geolocation_permission_context.h" | 18 #include "content/browser/geolocation/geolocation_permission_context.h" |
| 19 #include "content/browser/host_zoom_map.h" | 19 #include "content/browser/host_zoom_map.h" |
| 20 #include "content/browser/in_process_webkit/webkit_context.h" | 20 #include "content/browser/in_process_webkit/webkit_context.h" |
| 21 #include "content/browser/resource_context.h" | 21 #include "content/browser/resource_context.h" |
| 22 #include "content/browser/ssl/ssl_host_state.h" | 22 #include "content/browser/ssl/ssl_host_state.h" |
| 23 #include "content/browser/speech/speech_input_preferences.h" |
| 23 #include "content/shell/shell_browser_main.h" | 24 #include "content/shell/shell_browser_main.h" |
| 24 #include "net/base/cert_verifier.h" | 25 #include "net/base/cert_verifier.h" |
| 25 #include "net/base/cookie_monster.h" | 26 #include "net/base/cookie_monster.h" |
| 26 #include "net/base/default_origin_bound_cert_store.h" | 27 #include "net/base/default_origin_bound_cert_store.h" |
| 27 #include "net/base/dnsrr_resolver.h" | 28 #include "net/base/dnsrr_resolver.h" |
| 28 #include "net/base/host_resolver.h" | 29 #include "net/base/host_resolver.h" |
| 29 #include "net/http/http_auth_handler_factory.h" | 30 #include "net/http/http_auth_handler_factory.h" |
| 30 #include "net/http/http_cache.h" | 31 #include "net/http/http_cache.h" |
| 31 #include "net/base/origin_bound_cert_service.h" | 32 #include "net/base/origin_bound_cert_service.h" |
| 32 #include "net/base/ssl_config_service_defaults.h" | 33 #include "net/base/ssl_config_service_defaults.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 int render_view_id, | 212 int render_view_id, |
| 212 int bridge_id, | 213 int bridge_id, |
| 213 const GURL& requesting_frame) OVERRIDE { | 214 const GURL& requesting_frame) OVERRIDE { |
| 214 NOTIMPLEMENTED(); | 215 NOTIMPLEMENTED(); |
| 215 } | 216 } |
| 216 | 217 |
| 217 private: | 218 private: |
| 218 DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext); | 219 DISALLOW_COPY_AND_ASSIGN(ShellGeolocationPermissionContext); |
| 219 }; | 220 }; |
| 220 | 221 |
| 222 class ShellSpeechInputPreferences : public SpeechInputPreferences { |
| 223 public: |
| 224 ShellSpeechInputPreferences() { |
| 225 } |
| 226 |
| 227 // SpeechInputPreferences implementation. |
| 228 virtual bool censor_results() const OVERRIDE { |
| 229 return false; |
| 230 } |
| 231 |
| 232 virtual void set_censor_results(bool censor_results) OVERRIDE { |
| 233 } |
| 234 |
| 235 private: |
| 236 DISALLOW_COPY_AND_ASSIGN(ShellSpeechInputPreferences); |
| 237 }; |
| 238 |
| 221 } // namespace | 239 } // namespace |
| 222 | 240 |
| 223 namespace content { | 241 namespace content { |
| 224 | 242 |
| 225 ShellBrowserContext::ShellBrowserContext( | 243 ShellBrowserContext::ShellBrowserContext( |
| 226 ShellBrowserMainParts* shell_main_parts) | 244 ShellBrowserMainParts* shell_main_parts) |
| 227 : shell_main_parts_(shell_main_parts) { | 245 : shell_main_parts_(shell_main_parts) { |
| 228 } | 246 } |
| 229 | 247 |
| 230 ShellBrowserContext::~ShellBrowserContext() { | 248 ShellBrowserContext::~ShellBrowserContext() { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 328 |
| 311 GeolocationPermissionContext* | 329 GeolocationPermissionContext* |
| 312 ShellBrowserContext::GetGeolocationPermissionContext() { | 330 ShellBrowserContext::GetGeolocationPermissionContext() { |
| 313 if (!geolocation_permission_context_) { | 331 if (!geolocation_permission_context_) { |
| 314 geolocation_permission_context_ = | 332 geolocation_permission_context_ = |
| 315 new ShellGeolocationPermissionContext(); | 333 new ShellGeolocationPermissionContext(); |
| 316 } | 334 } |
| 317 return geolocation_permission_context_; | 335 return geolocation_permission_context_; |
| 318 } | 336 } |
| 319 | 337 |
| 338 SpeechInputPreferences* ShellBrowserContext::GetSpeechInputPreferences() { |
| 339 if (!speech_input_preferences_.get()) |
| 340 speech_input_preferences_ = new ShellSpeechInputPreferences(); |
| 341 return speech_input_preferences_.get(); |
| 342 } |
| 343 |
| 320 bool ShellBrowserContext::DidLastSessionExitCleanly() { | 344 bool ShellBrowserContext::DidLastSessionExitCleanly() { |
| 321 return true; | 345 return true; |
| 322 } | 346 } |
| 323 | 347 |
| 324 quota::QuotaManager* ShellBrowserContext::GetQuotaManager() { | 348 quota::QuotaManager* ShellBrowserContext::GetQuotaManager() { |
| 325 CreateQuotaManagerAndClients(); | 349 CreateQuotaManagerAndClients(); |
| 326 return quota_manager_.get(); | 350 return quota_manager_.get(); |
| 327 } | 351 } |
| 328 | 352 |
| 329 WebKitContext* ShellBrowserContext::GetWebKitContext() { | 353 WebKitContext* ShellBrowserContext::GetWebKitContext() { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 NewRunnableMethod( | 405 NewRunnableMethod( |
| 382 appcache_service_.get(), | 406 appcache_service_.get(), |
| 383 &ChromeAppCacheService::InitializeOnIOThread, | 407 &ChromeAppCacheService::InitializeOnIOThread, |
| 384 IsOffTheRecord() | 408 IsOffTheRecord() |
| 385 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), | 409 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), |
| 386 &GetResourceContext(), | 410 &GetResourceContext(), |
| 387 special_storage_policy)); | 411 special_storage_policy)); |
| 388 } | 412 } |
| 389 | 413 |
| 390 } // namespace content | 414 } // namespace content |
| OLD | NEW |