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

Side by Side Diff: chrome/browser/ui/webui/net_export_ui.cc

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/net_export_ui.h" 5 #include "chrome/browser/ui/webui/net_export_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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // This class receives javascript messages from the renderer. 47 // This class receives javascript messages from the renderer.
48 // Note that the WebUI infrastructure runs on the UI thread, therefore all of 48 // Note that the WebUI infrastructure runs on the UI thread, therefore all of
49 // this class's public methods are expected to run on the UI thread. All static 49 // this class's public methods are expected to run on the UI thread. All static
50 // functions except SendEmail run on FILE_USER_BLOCKING thread. 50 // functions except SendEmail run on FILE_USER_BLOCKING thread.
51 class NetExportMessageHandler 51 class NetExportMessageHandler
52 : public WebUIMessageHandler, 52 : public WebUIMessageHandler,
53 public base::SupportsWeakPtr<NetExportMessageHandler> { 53 public base::SupportsWeakPtr<NetExportMessageHandler> {
54 public: 54 public:
55 NetExportMessageHandler(); 55 NetExportMessageHandler();
56 virtual ~NetExportMessageHandler(); 56 ~NetExportMessageHandler() override;
57 57
58 // WebUIMessageHandler implementation. 58 // WebUIMessageHandler implementation.
59 virtual void RegisterMessages() override; 59 void RegisterMessages() override;
60 60
61 // Messages. 61 // Messages.
62 void OnGetExportNetLogInfo(const base::ListValue* list); 62 void OnGetExportNetLogInfo(const base::ListValue* list);
63 void OnStartNetLog(const base::ListValue* list); 63 void OnStartNetLog(const base::ListValue* list);
64 void OnStopNetLog(const base::ListValue* list); 64 void OnStopNetLog(const base::ListValue* list);
65 void OnSendNetLog(const base::ListValue* list); 65 void OnSendNetLog(const base::ListValue* list);
66 66
67 private: 67 private:
68 // Calls NetLogTempFile's ProcessCommand with DO_START and DO_STOP commands. 68 // Calls NetLogTempFile's ProcessCommand with DO_START and DO_STOP commands.
69 static void ProcessNetLogCommand( 69 static void ProcessNetLogCommand(
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 } // namespace 244 } // namespace
245 245
246 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) { 246 NetExportUI::NetExportUI(content::WebUI* web_ui) : WebUIController(web_ui) {
247 web_ui->AddMessageHandler(new NetExportMessageHandler()); 247 web_ui->AddMessageHandler(new NetExportMessageHandler());
248 248
249 // Set up the chrome://net-export/ source. 249 // Set up the chrome://net-export/ source.
250 Profile* profile = Profile::FromWebUI(web_ui); 250 Profile* profile = Profile::FromWebUI(web_ui);
251 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource()); 251 content::WebUIDataSource::Add(profile, CreateNetExportHTMLSource());
252 } 252 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698