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

Side by Side Diff: android_webview/browser/aw_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: comments Created 4 years, 1 month 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 (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 "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 27 matching lines...) Expand all
38 #include "components/navigation_interception/intercept_navigation_delegate.h" 38 #include "components/navigation_interception/intercept_navigation_delegate.h"
39 #include "content/public/browser/browser_message_filter.h" 39 #include "content/public/browser/browser_message_filter.h"
40 #include "content/public/browser/browser_thread.h" 40 #include "content/public/browser/browser_thread.h"
41 #include "content/public/browser/child_process_security_policy.h" 41 #include "content/public/browser/child_process_security_policy.h"
42 #include "content/public/browser/client_certificate_delegate.h" 42 #include "content/public/browser/client_certificate_delegate.h"
43 #include "content/public/browser/navigation_handle.h" 43 #include "content/public/browser/navigation_handle.h"
44 #include "content/public/browser/navigation_throttle.h" 44 #include "content/public/browser/navigation_throttle.h"
45 #include "content/public/browser/render_frame_host.h" 45 #include "content/public/browser/render_frame_host.h"
46 #include "content/public/browser/render_process_host.h" 46 #include "content/public/browser/render_process_host.h"
47 #include "content/public/browser/render_view_host.h" 47 #include "content/public/browser/render_view_host.h"
48 #include "content/public/browser/storage_partition.h"
48 #include "content/public/browser/web_contents.h" 49 #include "content/public/browser/web_contents.h"
49 #include "content/public/common/content_switches.h" 50 #include "content/public/common/content_switches.h"
50 #include "content/public/common/service_names.h" 51 #include "content/public/common/service_names.h"
51 #include "content/public/common/url_constants.h" 52 #include "content/public/common/url_constants.h"
52 #include "content/public/common/web_preferences.h" 53 #include "content/public/common/web_preferences.h"
53 #include "device/geolocation/access_token_store.h" 54 #include "device/geolocation/access_token_store.h"
54 #include "device/geolocation/geolocation_delegate.h" 55 #include "device/geolocation/geolocation_delegate.h"
55 #include "net/android/network_library.h" 56 #include "net/android/network_library.h"
56 #include "net/ssl/ssl_cert_request_info.h" 57 #include "net/ssl/ssl_cert_request_info.h"
57 #include "net/ssl/ssl_info.h" 58 #include "net/ssl/ssl_info.h"
59 #include "storage/browser/quota/quota_settings.h"
58 #include "ui/base/resource/resource_bundle.h" 60 #include "ui/base/resource/resource_bundle.h"
59 #include "ui/base/resource/resource_bundle_android.h" 61 #include "ui/base/resource/resource_bundle_android.h"
60 #include "ui/resources/grit/ui_resources.h" 62 #include "ui/resources/grit/ui_resources.h"
61 63
62 #if defined(ENABLE_SPELLCHECK) 64 #if defined(ENABLE_SPELLCHECK)
63 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" 65 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h"
64 #include "components/spellcheck/common/spellcheck_switches.h" 66 #include "components/spellcheck/common/spellcheck_switches.h"
65 #endif 67 #endif
66 68
67 using content::BrowserThread; 69 using content::BrowserThread;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 const std::vector<std::pair<int, int> >& render_frames) { 344 const std::vector<std::pair<int, int> >& render_frames) {
343 // Android WebView does not yet support web workers. 345 // Android WebView does not yet support web workers.
344 return false; 346 return false;
345 } 347 }
346 348
347 content::QuotaPermissionContext* 349 content::QuotaPermissionContext*
348 AwContentBrowserClient::CreateQuotaPermissionContext() { 350 AwContentBrowserClient::CreateQuotaPermissionContext() {
349 return new AwQuotaPermissionContext; 351 return new AwQuotaPermissionContext;
350 } 352 }
351 353
354 void AwContentBrowserClient::GetQuotaSettings(
355 content::BrowserContext* context,
356 content::StoragePartition* partition,
357 const storage::OptionalQuotaSettingsCallback& callback) {
358 content::BrowserThread::PostTaskAndReplyWithResult(
359 content::BrowserThread::FILE, FROM_HERE,
360 base::Bind(&storage::CalculateNominalDynamicSettings,
361 partition->GetPath(), context->IsOffTheRecord()),
362 callback);
363 }
364
352 void AwContentBrowserClient::AllowCertificateError( 365 void AwContentBrowserClient::AllowCertificateError(
353 content::WebContents* web_contents, 366 content::WebContents* web_contents,
354 int cert_error, 367 int cert_error,
355 const net::SSLInfo& ssl_info, 368 const net::SSLInfo& ssl_info,
356 const GURL& request_url, 369 const GURL& request_url,
357 ResourceType resource_type, 370 ResourceType resource_type,
358 bool overridable, 371 bool overridable,
359 bool strict_enforcement, 372 bool strict_enforcement,
360 bool expired_previous_decision, 373 bool expired_previous_decision,
361 const base::Callback<void(content::CertificateRequestResultType)>& 374 const base::Callback<void(content::CertificateRequestResultType)>&
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if (id == -1) 546 if (id == -1)
534 return nullptr; 547 return nullptr;
535 548
536 base::StringPiece manifest_contents = 549 base::StringPiece manifest_contents =
537 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 550 ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
538 id, ui::ScaleFactor::SCALE_FACTOR_NONE); 551 id, ui::ScaleFactor::SCALE_FACTOR_NONE);
539 return base::JSONReader::Read(manifest_contents); 552 return base::JSONReader::Read(manifest_contents);
540 } 553 }
541 554
542 } // namespace android_webview 555 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698