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

Side by Side Diff: chrome/browser/ui/webui/quota_internals/quota_internals_handler.cc

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/webui/quota_internals/quota_internals_handler.h" 5 #include "chrome/browser/ui/webui/quota_internals/quota_internals_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 16 matching lines...) Expand all
27 } 27 }
28 28
29 void QuotaInternalsHandler::RegisterMessages() { 29 void QuotaInternalsHandler::RegisterMessages() {
30 web_ui()->RegisterMessageCallback("requestInfo", 30 web_ui()->RegisterMessageCallback("requestInfo",
31 base::Bind(&QuotaInternalsHandler::OnRequestInfo, 31 base::Bind(&QuotaInternalsHandler::OnRequestInfo,
32 base::Unretained(this))); 32 base::Unretained(this)));
33 } 33 }
34 34
35 void QuotaInternalsHandler::ReportAvailableSpace(int64_t available_space) { 35 void QuotaInternalsHandler::ReportAvailableSpace(int64_t available_space) {
36 SendMessage("AvailableSpaceUpdated", 36 SendMessage("AvailableSpaceUpdated",
37 base::FundamentalValue(static_cast<double>(available_space))); 37 base::Value(static_cast<double>(available_space)));
38 } 38 }
39 39
40 void QuotaInternalsHandler::ReportGlobalInfo(const GlobalStorageInfo& data) { 40 void QuotaInternalsHandler::ReportGlobalInfo(const GlobalStorageInfo& data) {
41 std::unique_ptr<base::Value> value(data.NewValue()); 41 std::unique_ptr<base::Value> value(data.NewValue());
42 SendMessage("GlobalInfoUpdated", *value); 42 SendMessage("GlobalInfoUpdated", *value);
43 } 43 }
44 44
45 void QuotaInternalsHandler::ReportPerHostInfo( 45 void QuotaInternalsHandler::ReportPerHostInfo(
46 const std::vector<PerHostStorageInfo>& hosts) { 46 const std::vector<PerHostStorageInfo>& hosts) {
47 base::ListValue values; 47 base::ListValue values;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 void QuotaInternalsHandler::OnRequestInfo(const base::ListValue*) { 83 void QuotaInternalsHandler::OnRequestInfo(const base::ListValue*) {
84 if (!proxy_.get()) 84 if (!proxy_.get())
85 proxy_ = new QuotaInternalsProxy(this); 85 proxy_ = new QuotaInternalsProxy(this);
86 proxy_->RequestInfo( 86 proxy_->RequestInfo(
87 BrowserContext::GetDefaultStoragePartition( 87 BrowserContext::GetDefaultStoragePartition(
88 Profile::FromWebUI(web_ui()))->GetQuotaManager()); 88 Profile::FromWebUI(web_ui()))->GetQuotaManager());
89 } 89 }
90 90
91 } // namespace quota_internals 91 } // namespace quota_internals
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/print_preview/print_preview_ui.cc ('k') | chrome/browser/ui/webui/settings/certificates_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698