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

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

Issue 14039004: Add int params to URLDataSource::StartDataRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's not called a renderder. Created 7 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 | 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 namespace chromeos { 44 namespace chromeos {
45 45
46 class SystemInfoUIHTMLSource : public content::URLDataSource{ 46 class SystemInfoUIHTMLSource : public content::URLDataSource{
47 public: 47 public:
48 SystemInfoUIHTMLSource(); 48 SystemInfoUIHTMLSource();
49 49
50 // content::URLDataSource implementation. 50 // content::URLDataSource implementation.
51 virtual std::string GetSource() const OVERRIDE; 51 virtual std::string GetSource() const OVERRIDE;
52 virtual void StartDataRequest( 52 virtual void StartDataRequest(
53 const std::string& path, 53 const std::string& path,
54 bool is_incognito, 54 int render_process_id,
55 int render_view_id,
55 const content::URLDataSource::GotDataCallback& callback) OVERRIDE; 56 const content::URLDataSource::GotDataCallback& callback) OVERRIDE;
56 virtual std::string GetMimeType(const std::string&) const OVERRIDE { 57 virtual std::string GetMimeType(const std::string&) const OVERRIDE {
57 return "text/html"; 58 return "text/html";
58 } 59 }
59 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE { 60 virtual bool ShouldAddContentSecurityPolicy() const OVERRIDE {
60 return false; 61 return false;
61 } 62 }
62 63
63 private: 64 private:
64 virtual ~SystemInfoUIHTMLSource() {} 65 virtual ~SystemInfoUIHTMLSource() {}
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 : response_(NULL), 101 : response_(NULL),
101 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { 102 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
102 } 103 }
103 104
104 std::string SystemInfoUIHTMLSource::GetSource() const { 105 std::string SystemInfoUIHTMLSource::GetSource() const {
105 return chrome::kChromeUISystemInfoHost; 106 return chrome::kChromeUISystemInfoHost;
106 } 107 }
107 108
108 void SystemInfoUIHTMLSource::StartDataRequest( 109 void SystemInfoUIHTMLSource::StartDataRequest(
109 const std::string& path, 110 const std::string& path,
110 bool is_incognito, 111 int render_process_id,
112 int render_view_id,
111 const content::URLDataSource::GotDataCallback& callback) { 113 const content::URLDataSource::GotDataCallback& callback) {
112 path_ = path; 114 path_ = path;
113 callback_ = callback; 115 callback_ = callback;
114 116
115 SystemLogsFetcher* fetcher = new SystemLogsFetcher(); 117 SystemLogsFetcher* fetcher = new SystemLogsFetcher();
116 fetcher->Fetch(base::Bind(&SystemInfoUIHTMLSource::SysInfoComplete, 118 fetcher->Fetch(base::Bind(&SystemInfoUIHTMLSource::SysInfoComplete,
117 weak_ptr_factory_.GetWeakPtr())); 119 weak_ptr_factory_.GetWeakPtr()));
118 } 120 }
119 121
120 122
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 SystemInfoHandler* handler = new SystemInfoHandler(); 188 SystemInfoHandler* handler = new SystemInfoHandler();
187 web_ui->AddMessageHandler(handler); 189 web_ui->AddMessageHandler(handler);
188 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource(); 190 SystemInfoUIHTMLSource* html_source = new SystemInfoUIHTMLSource();
189 191
190 // Set up the chrome://system/ source. 192 // Set up the chrome://system/ source.
191 Profile* profile = Profile::FromWebUI(web_ui); 193 Profile* profile = Profile::FromWebUI(web_ui);
192 content::URLDataSource::Add(profile, html_source); 194 content::URLDataSource::Add(profile, html_source);
193 } 195 }
194 196
195 } // namespace chromeos 197 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc ('k') | chrome/browser/ui/webui/devtools_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698