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

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

Issue 10836039: Chrome diagnostics: First cut at implementing chrome://diagnostics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits from jhawkins@. Created 8 years, 4 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/sim_unlock_ui.h" 5 #include "chrome/browser/ui/webui/chromeos/sim_unlock_ui.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 namespace chromeos { 72 namespace chromeos {
73 73
74 class SimUnlockUIHTMLSource : public ChromeURLDataManager::DataSource { 74 class SimUnlockUIHTMLSource : public ChromeURLDataManager::DataSource {
75 public: 75 public:
76 SimUnlockUIHTMLSource(); 76 SimUnlockUIHTMLSource();
77 77
78 // Called when the network layer has requested a resource underneath 78 // Called when the network layer has requested a resource underneath
79 // the path we registered. 79 // the path we registered.
80 virtual void StartDataRequest(const std::string& path, 80 virtual void StartDataRequest(const std::string& path,
81 bool is_incognito, 81 bool is_incognito,
82 int request_id); 82 int request_id) OVERRIDE;
83 virtual std::string GetMimeType(const std::string&) const { 83 virtual std::string GetMimeType(const std::string&) const OVERRIDE {
84 return "text/html"; 84 return "text/html";
85 } 85 }
86 86
87 private: 87 private:
88 virtual ~SimUnlockUIHTMLSource() {} 88 virtual ~SimUnlockUIHTMLSource() {}
89 89
90 std::string service_path_; 90 std::string service_path_;
91 DISALLOW_COPY_AND_ASSIGN(SimUnlockUIHTMLSource); 91 DISALLOW_COPY_AND_ASSIGN(SimUnlockUIHTMLSource);
92 }; 92 };
93 93
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 SimUnlockHandler* handler = new SimUnlockHandler(); 673 SimUnlockHandler* handler = new SimUnlockHandler();
674 web_ui->AddMessageHandler(handler); 674 web_ui->AddMessageHandler(handler);
675 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource(); 675 SimUnlockUIHTMLSource* html_source = new SimUnlockUIHTMLSource();
676 676
677 // Set up the chrome://sim-unlock/ source. 677 // Set up the chrome://sim-unlock/ source.
678 Profile* profile = Profile::FromWebUI(web_ui); 678 Profile* profile = Profile::FromWebUI(web_ui);
679 ChromeURLDataManager::AddDataSource(profile, html_source); 679 ChromeURLDataManager::AddDataSource(profile, html_source);
680 } 680 }
681 681
682 } // namespace chromeos 682 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/diagnostics/diagnostics_ui.cc ('k') | chrome/browser/ui/webui/chromeos/system_info_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698