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

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

Issue 819193002: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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/renderer/dispatcher.cc ('k') | extensions/shell/app/shell_main_delegate.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/process_info_native_handler.h" 5 #include "extensions/renderer/process_info_native_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "extensions/renderer/script_context.h" 9 #include "extensions/renderer/script_context.h"
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 args.GetReturnValue().Set(v8::String::NewFromUtf8( 71 args.GetReturnValue().Set(v8::String::NewFromUtf8(
72 args.GetIsolate(), 72 args.GetIsolate(),
73 "sendRequest and onRequest are obsolete." 73 "sendRequest and onRequest are obsolete."
74 " Please use sendMessage and onMessage instead.")); 74 " Please use sendMessage and onMessage instead."));
75 } 75 }
76 } 76 }
77 77
78 void ProcessInfoNativeHandler::HasSwitch( 78 void ProcessInfoNativeHandler::HasSwitch(
79 const v8::FunctionCallbackInfo<v8::Value>& args) { 79 const v8::FunctionCallbackInfo<v8::Value>& args) {
80 CHECK(args.Length() == 1 && args[0]->IsString()); 80 CHECK(args.Length() == 1 && args[0]->IsString());
81 bool has_switch = CommandLine::ForCurrentProcess()->HasSwitch( 81 bool has_switch = base::CommandLine::ForCurrentProcess()->HasSwitch(
82 *v8::String::Utf8Value(args[0])); 82 *v8::String::Utf8Value(args[0]));
83 args.GetReturnValue().Set(v8::Boolean::New(args.GetIsolate(), has_switch)); 83 args.GetReturnValue().Set(v8::Boolean::New(args.GetIsolate(), has_switch));
84 } 84 }
85 85
86 } // namespace extensions 86 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/shell/app/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698