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

Side by Side Diff: chrome/browser/ui/webui/user_actions/user_actions_ui_handler.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/uber/uber_ui.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/user_actions/user_actions_ui_handler.h" 5 #include "chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/metrics/user_metrics.h" 8 #include "base/metrics/user_metrics.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/public/browser/web_ui.h" 10 #include "content/public/browser/web_ui.h"
11 11
12 UserActionsUIHandler::UserActionsUIHandler() 12 UserActionsUIHandler::UserActionsUIHandler()
13 : action_callback_(base::Bind(&UserActionsUIHandler::OnUserAction, 13 : action_callback_(base::Bind(&UserActionsUIHandler::OnUserAction,
14 base::Unretained(this))) { 14 base::Unretained(this))) {
15 base::AddActionCallback(action_callback_); 15 base::AddActionCallback(action_callback_);
16 } 16 }
17 17
18 UserActionsUIHandler::~UserActionsUIHandler() { 18 UserActionsUIHandler::~UserActionsUIHandler() {
19 base::RemoveActionCallback(action_callback_); 19 base::RemoveActionCallback(action_callback_);
20 } 20 }
21 21
22 void UserActionsUIHandler::RegisterMessages() {} 22 void UserActionsUIHandler::RegisterMessages() {}
23 23
24 void UserActionsUIHandler::OnUserAction(const std::string& action) { 24 void UserActionsUIHandler::OnUserAction(const std::string& action) {
25 base::StringValue user_action_name(action); 25 base::Value user_action_name(action);
26 web_ui()->CallJavascriptFunctionUnsafe("userActions.observeUserAction", 26 web_ui()->CallJavascriptFunctionUnsafe("userActions.observeUserAction",
27 user_action_name); 27 user_action_name);
28 } 28 }
29 29
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/uber/uber_ui.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698