OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" | 40 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" |
41 #include "chromecast/public/media/media_pipeline_backend.h" | 41 #include "chromecast/public/media/media_pipeline_backend.h" |
42 #include "components/crash/content/app/breakpad_linux.h" | 42 #include "components/crash/content/app/breakpad_linux.h" |
43 #include "components/crash/content/browser/crash_handler_host_linux.h" | 43 #include "components/crash/content/browser/crash_handler_host_linux.h" |
44 #include "components/network_hints/browser/network_hints_message_filter.h" | 44 #include "components/network_hints/browser/network_hints_message_filter.h" |
45 #include "content/public/browser/browser_thread.h" | 45 #include "content/public/browser/browser_thread.h" |
46 #include "content/public/browser/certificate_request_result_type.h" | 46 #include "content/public/browser/certificate_request_result_type.h" |
47 #include "content/public/browser/client_certificate_delegate.h" | 47 #include "content/public/browser/client_certificate_delegate.h" |
48 #include "content/public/browser/render_process_host.h" | 48 #include "content/public/browser/render_process_host.h" |
49 #include "content/public/browser/resource_dispatcher_host.h" | 49 #include "content/public/browser/resource_dispatcher_host.h" |
| 50 #include "content/public/browser/storage_partition.h" |
50 #include "content/public/browser/web_contents.h" | 51 #include "content/public/browser/web_contents.h" |
51 #include "content/public/common/content_descriptors.h" | 52 #include "content/public/common/content_descriptors.h" |
52 #include "content/public/common/content_switches.h" | 53 #include "content/public/common/content_switches.h" |
53 #include "content/public/common/service_names.mojom.h" | 54 #include "content/public/common/service_names.mojom.h" |
54 #include "content/public/common/url_constants.h" | 55 #include "content/public/common/url_constants.h" |
55 #include "content/public/common/web_preferences.h" | 56 #include "content/public/common/web_preferences.h" |
56 #include "net/ssl/ssl_cert_request_info.h" | 57 #include "net/ssl/ssl_cert_request_info.h" |
57 #include "net/url_request/url_request_context_getter.h" | 58 #include "net/url_request/url_request_context_getter.h" |
58 #include "services/service_manager/public/cpp/interface_registry.h" | 59 #include "services/service_manager/public/cpp/interface_registry.h" |
59 #include "ui/base/resource/resource_bundle.h" | 60 #include "ui/base/resource/resource_bundle.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 std::string CastContentBrowserClient::GetApplicationLocale() { | 335 std::string CastContentBrowserClient::GetApplicationLocale() { |
335 const std::string locale(base::i18n::GetConfiguredLocale()); | 336 const std::string locale(base::i18n::GetConfiguredLocale()); |
336 return locale.empty() ? "en-US" : locale; | 337 return locale.empty() ? "en-US" : locale; |
337 } | 338 } |
338 | 339 |
339 content::QuotaPermissionContext* | 340 content::QuotaPermissionContext* |
340 CastContentBrowserClient::CreateQuotaPermissionContext() { | 341 CastContentBrowserClient::CreateQuotaPermissionContext() { |
341 return new CastQuotaPermissionContext(); | 342 return new CastQuotaPermissionContext(); |
342 } | 343 } |
343 | 344 |
| 345 void CastContentBrowserClient::GetQuotaSettings( |
| 346 content::BrowserContext* context, |
| 347 content::StoragePartition* partition, |
| 348 const storage::OptionalQuotaSettingsCallback& callback) { |
| 349 content::BrowserThread::PostTaskAndReplyWithResult( |
| 350 content::BrowserThread::FILE, FROM_HERE, |
| 351 base::Bind(&storage::CalculateNominalDynamicSettings, |
| 352 partition->GetPath(), context->IsOffTheRecord()), |
| 353 callback); |
| 354 } |
344 void CastContentBrowserClient::AllowCertificateError( | 355 void CastContentBrowserClient::AllowCertificateError( |
345 content::WebContents* web_contents, | 356 content::WebContents* web_contents, |
346 int cert_error, | 357 int cert_error, |
347 const net::SSLInfo& ssl_info, | 358 const net::SSLInfo& ssl_info, |
348 const GURL& request_url, | 359 const GURL& request_url, |
349 content::ResourceType resource_type, | 360 content::ResourceType resource_type, |
350 bool overridable, | 361 bool overridable, |
351 bool strict_enforcement, | 362 bool strict_enforcement, |
352 bool expired_previous_decision, | 363 bool expired_previous_decision, |
353 const base::Callback<void(content::CertificateRequestResultType)>& | 364 const base::Callback<void(content::CertificateRequestResultType)>& |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 process_type, dumps_path, false /* upload */); | 537 process_type, dumps_path, false /* upload */); |
527 // StartUploaderThread() even though upload is diferred. | 538 // StartUploaderThread() even though upload is diferred. |
528 // Breakpad-related memory is freed in the uploader thread. | 539 // Breakpad-related memory is freed in the uploader thread. |
529 crash_handler->StartUploaderThread(); | 540 crash_handler->StartUploaderThread(); |
530 return crash_handler; | 541 return crash_handler; |
531 } | 542 } |
532 #endif // !defined(OS_ANDROID) | 543 #endif // !defined(OS_ANDROID) |
533 | 544 |
534 } // namespace shell | 545 } // namespace shell |
535 } // namespace chromecast | 546 } // namespace chromecast |
OLD | NEW |