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

Side by Side Diff: blimp/engine/app/blimp_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 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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "blimp/engine/app/blimp_browser_main_parts.h" 6 #include "blimp/engine/app/blimp_browser_main_parts.h"
7 #include "blimp/engine/app/blimp_content_browser_client.h" 7 #include "blimp/engine/app/blimp_content_browser_client.h"
8 #include "blimp/engine/app/settings_manager.h" 8 #include "blimp/engine/app/settings_manager.h"
9 #include "blimp/engine/grit/blimp_browser_resources.h" 9 #include "blimp/engine/grit/blimp_browser_resources.h"
10 #include "blimp/engine/mojo/blob_channel_service.h" 10 #include "blimp/engine/mojo/blob_channel_service.h"
11 #include "content/public/browser/browser_context.h"
11 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "content/public/browser/storage_partition.h"
12 #include "content/public/common/service_names.mojom.h" 14 #include "content/public/common/service_names.mojom.h"
13 #include "services/service_manager/public/cpp/interface_registry.h" 15 #include "services/service_manager/public/cpp/interface_registry.h"
16 #include "storage/browser/quota/quota_settings.h"
14 #include "ui/base/resource/resource_bundle.h" 17 #include "ui/base/resource/resource_bundle.h"
15 18
16 namespace blimp { 19 namespace blimp {
17 namespace engine { 20 namespace engine {
18 21
19 BlimpContentBrowserClient::BlimpContentBrowserClient() {} 22 BlimpContentBrowserClient::BlimpContentBrowserClient() {}
20 23
21 BlimpContentBrowserClient::~BlimpContentBrowserClient() {} 24 BlimpContentBrowserClient::~BlimpContentBrowserClient() {}
22 25
23 content::BrowserMainParts* BlimpContentBrowserClient::CreateBrowserMainParts( 26 content::BrowserMainParts* BlimpContentBrowserClient::CreateBrowserMainParts(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 65 }
63 if (id == -1) { 66 if (id == -1) {
64 return nullptr; 67 return nullptr;
65 } 68 }
66 69
67 base::StringPiece manifest_contents = 70 base::StringPiece manifest_contents =
68 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE); 71 rb.GetRawDataResourceForScale(id, ui::ScaleFactor::SCALE_FACTOR_NONE);
69 return base::JSONReader::Read(manifest_contents); 72 return base::JSONReader::Read(manifest_contents);
70 } 73 }
71 74
75 void BlimpContentBrowserClient::GetQuotaSettings(
76 content::BrowserContext* context,
77 content::StoragePartition* partition,
78 const storage::OptionalQuotaSettingsCallback& callback) {
79 content::BrowserThread::PostTaskAndReplyWithResult(
80 content::BrowserThread::FILE, FROM_HERE,
81 base::Bind(&storage::CalculateNominalDynamicSettings,
82 partition->GetPath(), context->IsOffTheRecord()),
83 callback);
84 }
85
72 } // namespace engine 86 } // namespace engine
73 } // namespace blimp 87 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698