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

Side by Side Diff: chrome/browser/ui/webui/chromeos/system_info_ui.cc

Issue 16871010: Rewrite scoped_ptr<T>(NULL) to use the default ctor in chrome/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/system_info_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/system_info_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 private: 90 private:
91 DISALLOW_COPY_AND_ASSIGN(SystemInfoHandler); 91 DISALLOW_COPY_AND_ASSIGN(SystemInfoHandler);
92 }; 92 };
93 93
94 //////////////////////////////////////////////////////////////////////////////// 94 ////////////////////////////////////////////////////////////////////////////////
95 // 95 //
96 // SystemInfoUIHTMLSource 96 // SystemInfoUIHTMLSource
97 // 97 //
98 //////////////////////////////////////////////////////////////////////////////// 98 ////////////////////////////////////////////////////////////////////////////////
99 99
100 SystemInfoUIHTMLSource::SystemInfoUIHTMLSource() 100 SystemInfoUIHTMLSource::SystemInfoUIHTMLSource() : weak_ptr_factory_(this) {}
101 : response_(NULL),
102 weak_ptr_factory_(this) {
103 }
104 101
105 std::string SystemInfoUIHTMLSource::GetSource() const { 102 std::string SystemInfoUIHTMLSource::GetSource() const {
106 return chrome::kChromeUISystemInfoHost; 103 return chrome::kChromeUISystemInfoHost;
107 } 104 }
108 105
109 void SystemInfoUIHTMLSource::StartDataRequest( 106 void SystemInfoUIHTMLSource::StartDataRequest(
110 const std::string& path, 107 const std::string& path,
111 int render_process_id, 108 int render_process_id,
112 int render_view_id, 109 int render_view_id,
113 const content::URLDataSource::GotDataCallback& callback) { 110 const content::URLDataSource::GotDataCallback& callback) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 SystemInfoHandler* handler = new SystemInfoHandler(); 185 SystemInfoHandler* handler = new SystemInfoHandler();
189 web_ui->AddMessageHandler(handler); 186 web_ui->AddMessageHandler(handler);
190 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); 187 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
191 188
192 // Set up the chrome://system/ source. 189 // Set up the chrome://system/ source.
193 Profile* profile = Profile::FromWebUI(web_ui); 190 Profile* profile = Profile::FromWebUI(web_ui);
194 content::URLDataSource::Add(profile, html_source); 191 content::URLDataSource::Add(profile, html_source);
195 } 192 }
196 193
197 } // namespace chromeos 194 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698