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

Side by Side Diff: chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc

Issue 23508003: Added UMA actions to devices page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/local_discovery/local_discovery_ui.h" 5 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" 8 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h"
9 #include "chrome/browser/ui/webui/metrics_handler.h"
9 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_ui.h" 11 #include "content/public/browser/web_ui.h"
11 #include "content/public/browser/web_ui_data_source.h" 12 #include "content/public/browser/web_ui_data_source.h"
12 #include "grit/browser_resources.h" 13 #include "grit/browser_resources.h"
13 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
14 15
15 namespace { 16 namespace {
16 17
17 content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() { 18 content::WebUIDataSource* CreateLocalDiscoveryHTMLSource() {
18 content::WebUIDataSource* source = 19 content::WebUIDataSource* source =
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 77
77 LocalDiscoveryUI::LocalDiscoveryUI(content::WebUI* web_ui) 78 LocalDiscoveryUI::LocalDiscoveryUI(content::WebUI* web_ui)
78 : WebUIController(web_ui) { 79 : WebUIController(web_ui) {
79 // Set up the chrome://devices/ source. 80 // Set up the chrome://devices/ source.
80 Profile* profile = Profile::FromWebUI(web_ui); 81 Profile* profile = Profile::FromWebUI(web_ui);
81 content::WebUIDataSource::Add(profile, CreateLocalDiscoveryHTMLSource()); 82 content::WebUIDataSource::Add(profile, CreateLocalDiscoveryHTMLSource());
82 83
83 // TODO(gene): Use LocalDiscoveryUIHandler to send updated to the devices 84 // TODO(gene): Use LocalDiscoveryUIHandler to send updated to the devices
84 // page. For example 85 // page. For example
85 web_ui->AddMessageHandler(local_discovery::LocalDiscoveryUIHandler::Create()); 86 web_ui->AddMessageHandler(local_discovery::LocalDiscoveryUIHandler::Create());
87 web_ui->AddMessageHandler(new MetricsHandler());
86 } 88 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/local_discovery/local_discovery.js ('k') | tools/metrics/actions/chromeactions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698