Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InProcessBrowserTest and SetDefaultQuotaSettingsForTesting Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 std::string CastContentBrowserClient::GetApplicationLocale() { 316 std::string CastContentBrowserClient::GetApplicationLocale() {
316 const std::string locale(base::i18n::GetConfiguredLocale()); 317 const std::string locale(base::i18n::GetConfiguredLocale());
317 return locale.empty() ? "en-US" : locale; 318 return locale.empty() ? "en-US" : locale;
318 } 319 }
319 320
320 content::QuotaPermissionContext* 321 content::QuotaPermissionContext*
321 CastContentBrowserClient::CreateQuotaPermissionContext() { 322 CastContentBrowserClient::CreateQuotaPermissionContext() {
322 return new CastQuotaPermissionContext(); 323 return new CastQuotaPermissionContext();
323 } 324 }
324 325
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 }
325 void CastContentBrowserClient::AllowCertificateError( 336 void CastContentBrowserClient::AllowCertificateError(
326 content::WebContents* web_contents, 337 content::WebContents* web_contents,
327 int cert_error, 338 int cert_error,
328 const net::SSLInfo& ssl_info, 339 const net::SSLInfo& ssl_info,
329 const GURL& request_url, 340 const GURL& request_url,
330 content::ResourceType resource_type, 341 content::ResourceType resource_type,
331 bool overridable, 342 bool overridable,
332 bool strict_enforcement, 343 bool strict_enforcement,
333 bool expired_previous_decision, 344 bool expired_previous_decision,
334 const base::Callback<void(content::CertificateRequestResultType)>& 345 const base::Callback<void(content::CertificateRequestResultType)>&
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 process_type, dumps_path, false /* upload */); 557 process_type, dumps_path, false /* upload */);
547 // StartUploaderThread() even though upload is diferred. 558 // StartUploaderThread() even though upload is diferred.
548 // Breakpad-related memory is freed in the uploader thread. 559 // Breakpad-related memory is freed in the uploader thread.
549 crash_handler->StartUploaderThread(); 560 crash_handler->StartUploaderThread();
550 return crash_handler; 561 return crash_handler;
551 } 562 }
552 #endif // !defined(OS_ANDROID) 563 #endif // !defined(OS_ANDROID)
553 564
554 } // namespace shell 565 } // namespace shell
555 } // namespace chromecast 566 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698