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

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

Issue 396493004: Get rid of some uses of CreateDoubleValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: right number of args + fix lint error Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 proxy_->handler_ = NULL; 27 proxy_->handler_ = NULL;
28 } 28 }
29 29
30 void QuotaInternalsHandler::RegisterMessages() { 30 void QuotaInternalsHandler::RegisterMessages() {
31 web_ui()->RegisterMessageCallback("requestInfo", 31 web_ui()->RegisterMessageCallback("requestInfo",
32 base::Bind(&QuotaInternalsHandler::OnRequestInfo, 32 base::Bind(&QuotaInternalsHandler::OnRequestInfo,
33 base::Unretained(this))); 33 base::Unretained(this)));
34 } 34 }
35 35
36 void QuotaInternalsHandler::ReportAvailableSpace(int64 available_space) { 36 void QuotaInternalsHandler::ReportAvailableSpace(int64 available_space) {
37 scoped_ptr<base::Value> avail( 37 SendMessage("AvailableSpaceUpdated",
38 base::Value::CreateDoubleValue(static_cast<double>(available_space))); 38 base::FundamentalValue(static_cast<double>(available_space)));
39 SendMessage("AvailableSpaceUpdated", *avail);
40 } 39 }
41 40
42 void QuotaInternalsHandler::ReportGlobalInfo(const GlobalStorageInfo& data) { 41 void QuotaInternalsHandler::ReportGlobalInfo(const GlobalStorageInfo& data) {
43 scoped_ptr<base::Value> value(data.NewValue()); 42 scoped_ptr<base::Value> value(data.NewValue());
44 SendMessage("GlobalInfoUpdated", *value); 43 SendMessage("GlobalInfoUpdated", *value);
45 } 44 }
46 45
47 void QuotaInternalsHandler::ReportPerHostInfo( 46 void QuotaInternalsHandler::ReportPerHostInfo(
48 const std::vector<PerHostStorageInfo>& hosts) { 47 const std::vector<PerHostStorageInfo>& hosts) {
49 base::ListValue values; 48 base::ListValue values;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 83
85 void QuotaInternalsHandler::OnRequestInfo(const base::ListValue*) { 84 void QuotaInternalsHandler::OnRequestInfo(const base::ListValue*) {
86 if (!proxy_.get()) 85 if (!proxy_.get())
87 proxy_ = new QuotaInternalsProxy(this); 86 proxy_ = new QuotaInternalsProxy(this);
88 proxy_->RequestInfo( 87 proxy_->RequestInfo(
89 BrowserContext::GetDefaultStoragePartition( 88 BrowserContext::GetDefaultStoragePartition(
90 Profile::FromWebUI(web_ui()))->GetQuotaManager()); 89 Profile::FromWebUI(web_ui()))->GetQuotaManager());
91 } 90 }
92 91
93 } // namespace quota_internals 92 } // namespace quota_internals
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698