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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 20 matching lines...) Expand all
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::FundamentalValue(static_cast<double>(available_space)));
38 } 38 }
39 39
40 void QuotaInternalsHandler::ReportGlobalInfo(const GlobalStorageInfo& data) { 40 void QuotaInternalsHandler::ReportGlobalInfo(const GlobalStorageInfo& data) {
41 scoped_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;
48 typedef std::vector<PerHostStorageInfo>::const_iterator iterator; 48 typedef std::vector<PerHostStorageInfo>::const_iterator iterator;
49 for (iterator itr(hosts.begin()); itr != hosts.end(); ++itr) { 49 for (iterator itr(hosts.begin()); itr != hosts.end(); ++itr) {
50 values.Append(itr->NewValue()); 50 values.Append(itr->NewValue());
51 } 51 }
(...skipping 30 matching lines...) Expand all
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/profiler_ui.cc ('k') | chrome/browser/ui/webui/quota_internals/quota_internals_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698