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

Side by Side Diff: extensions/renderer/print_native_handler.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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 | « extensions/common/url_pattern.cc ('k') | gin/modules/console.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/print_native_handler.h" 5 #include "extensions/renderer/print_native_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 PrintNativeHandler::PrintNativeHandler(ScriptContext* context) 14 PrintNativeHandler::PrintNativeHandler(ScriptContext* context)
15 : ObjectBackedNativeHandler(context) { 15 : ObjectBackedNativeHandler(context) {
16 RouteFunction("Print", 16 RouteFunction("Print",
17 base::Bind(&PrintNativeHandler::Print, base::Unretained(this))); 17 base::Bind(&PrintNativeHandler::Print, base::Unretained(this)));
18 } 18 }
19 19
20 void PrintNativeHandler::Print( 20 void PrintNativeHandler::Print(
21 const v8::FunctionCallbackInfo<v8::Value>& args) { 21 const v8::FunctionCallbackInfo<v8::Value>& args) {
22 if (args.Length() < 1) 22 if (args.Length() < 1)
23 return; 23 return;
24 24
25 std::vector<std::string> components; 25 std::vector<std::string> components;
26 for (int i = 0; i < args.Length(); ++i) 26 for (int i = 0; i < args.Length(); ++i)
27 components.push_back(*v8::String::Utf8Value(args[i])); 27 components.push_back(*v8::String::Utf8Value(args[i]));
28 28
29 LOG(ERROR) << JoinString(components, ','); 29 LOG(ERROR) << base::JoinString(components, ",");
30 } 30 }
31 31
32 } // namespace extensions 32 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/url_pattern.cc ('k') | gin/modules/console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698