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" | |
51 #include "content/public/browser/web_contents.h" | 50 #include "content/public/browser/web_contents.h" |
52 #include "content/public/common/content_descriptors.h" | 51 #include "content/public/common/content_descriptors.h" |
53 #include "content/public/common/content_switches.h" | 52 #include "content/public/common/content_switches.h" |
54 #include "content/public/common/service_names.mojom.h" | 53 #include "content/public/common/service_names.mojom.h" |
55 #include "content/public/common/url_constants.h" | 54 #include "content/public/common/url_constants.h" |
56 #include "content/public/common/web_preferences.h" | 55 #include "content/public/common/web_preferences.h" |
57 #include "net/ssl/ssl_cert_request_info.h" | 56 #include "net/ssl/ssl_cert_request_info.h" |
58 #include "net/url_request/url_request_context_getter.h" | 57 #include "net/url_request/url_request_context_getter.h" |
59 #include "services/service_manager/public/cpp/interface_registry.h" | 58 #include "services/service_manager/public/cpp/interface_registry.h" |
60 #include "ui/base/resource/resource_bundle.h" | 59 #include "ui/base/resource/resource_bundle.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 std::string CastContentBrowserClient::GetApplicationLocale() { | 315 std::string CastContentBrowserClient::GetApplicationLocale() { |
317 const std::string locale(base::i18n::GetConfiguredLocale()); | 316 const std::string locale(base::i18n::GetConfiguredLocale()); |
318 return locale.empty() ? "en-US" : locale; | 317 return locale.empty() ? "en-US" : locale; |
319 } | 318 } |
320 | 319 |
321 content::QuotaPermissionContext* | 320 content::QuotaPermissionContext* |
322 CastContentBrowserClient::CreateQuotaPermissionContext() { | 321 CastContentBrowserClient::CreateQuotaPermissionContext() { |
323 return new CastQuotaPermissionContext(); | 322 return new CastQuotaPermissionContext(); |
324 } | 323 } |
325 | 324 |
326 void CastContentBrowserClient::GetQuotaSettings( | |
327 content::BrowserContext* context, | |
328 content::StoragePartition* partition, | |
329 const storage::OptionalQuotaSettingsCallback& callback) { | |
330 content::BrowserThread::PostTaskAndReplyWithResult( | |
331 content::BrowserThread::FILE, FROM_HERE, | |
332 base::Bind(&storage::CalculateNominalDynamicSettings, | |
333 partition->GetPath(), context->IsOffTheRecord()), | |
334 callback); | |
335 } | |
336 void CastContentBrowserClient::AllowCertificateError( | 325 void CastContentBrowserClient::AllowCertificateError( |
337 content::WebContents* web_contents, | 326 content::WebContents* web_contents, |
338 int cert_error, | 327 int cert_error, |
339 const net::SSLInfo& ssl_info, | 328 const net::SSLInfo& ssl_info, |
340 const GURL& request_url, | 329 const GURL& request_url, |
341 content::ResourceType resource_type, | 330 content::ResourceType resource_type, |
342 bool overridable, | 331 bool overridable, |
343 bool strict_enforcement, | 332 bool strict_enforcement, |
344 bool expired_previous_decision, | 333 bool expired_previous_decision, |
345 const base::Callback<void(content::CertificateRequestResultType)>& | 334 const base::Callback<void(content::CertificateRequestResultType)>& |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 process_type, dumps_path, false /* upload */); | 546 process_type, dumps_path, false /* upload */); |
558 // StartUploaderThread() even though upload is diferred. | 547 // StartUploaderThread() even though upload is diferred. |
559 // Breakpad-related memory is freed in the uploader thread. | 548 // Breakpad-related memory is freed in the uploader thread. |
560 crash_handler->StartUploaderThread(); | 549 crash_handler->StartUploaderThread(); |
561 return crash_handler; | 550 return crash_handler; |
562 } | 551 } |
563 #endif // !defined(OS_ANDROID) | 552 #endif // !defined(OS_ANDROID) |
564 | 553 |
565 } // namespace shell | 554 } // namespace shell |
566 } // namespace chromecast | 555 } // namespace chromecast |
OLD | NEW |