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

Side by Side Diff: headless/lib/browser/headless_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: rebase Created 3 years, 10 months 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
« no previous file with comments | « headless/lib/browser/headless_content_browser_client.h ('k') | storage/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "headless/lib/browser/headless_content_browser_client.h" 5 #include "headless/lib/browser/headless_content_browser_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <unordered_set> 8 #include <unordered_set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/json/json_reader.h" 11 #include "base/json/json_reader.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "content/public/browser/browser_context.h" 13 #include "content/public/browser/browser_context.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
16 #include "content/public/browser/render_view_host.h" 16 #include "content/public/browser/render_view_host.h"
17 #include "content/public/browser/storage_partition.h"
17 #include "content/public/common/service_names.mojom.h" 18 #include "content/public/common/service_names.mojom.h"
18 #include "headless/grit/headless_lib_resources.h" 19 #include "headless/grit/headless_lib_resources.h"
19 #include "headless/lib/browser/headless_browser_context_impl.h" 20 #include "headless/lib/browser/headless_browser_context_impl.h"
20 #include "headless/lib/browser/headless_browser_impl.h" 21 #include "headless/lib/browser/headless_browser_impl.h"
21 #include "headless/lib/browser/headless_browser_main_parts.h" 22 #include "headless/lib/browser/headless_browser_main_parts.h"
22 #include "headless/lib/browser/headless_devtools_manager_delegate.h" 23 #include "headless/lib/browser/headless_devtools_manager_delegate.h"
24 #include "storage/browser/quota/quota_settings.h"
23 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
24 26
25 namespace headless { 27 namespace headless {
26 28
27 namespace { 29 namespace {
28 const char kCapabilityPath[] = 30 const char kCapabilityPath[] =
29 "interface_provider_specs.navigation:frame.provides.renderer"; 31 "interface_provider_specs.navigation:frame.provides.renderer";
30 } // namespace 32 } // namespace
31 33
32 HeadlessContentBrowserClient::HeadlessContentBrowserClient( 34 HeadlessContentBrowserClient::HeadlessContentBrowserClient(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 base::ListValue* capability_list = nullptr; 81 base::ListValue* capability_list = nullptr;
80 CHECK(manifest_dictionary->GetList(kCapabilityPath, &capability_list)); 82 CHECK(manifest_dictionary->GetList(kCapabilityPath, &capability_list));
81 83
82 for (std::string service_name : browser_->options()->mojo_service_names) { 84 for (std::string service_name : browser_->options()->mojo_service_names) {
83 capability_list->AppendString(service_name); 85 capability_list->AppendString(service_name);
84 } 86 }
85 87
86 return manifest; 88 return manifest;
87 } 89 }
88 90
91 void HeadlessContentBrowserClient::GetQuotaSettings(
92 content::BrowserContext* context,
93 content::StoragePartition* partition,
94 const storage::OptionalQuotaSettingsCallback& callback) {
95 content::BrowserThread::PostTaskAndReplyWithResult(
96 content::BrowserThread::FILE, FROM_HERE,
97 base::Bind(&storage::CalculateNominalDynamicSettings,
98 partition->GetPath(), context->IsOffTheRecord()),
99 callback);
100 }
101
89 } // namespace headless 102 } // namespace headless
OLDNEW
« no previous file with comments | « headless/lib/browser/headless_content_browser_client.h ('k') | storage/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698