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

Side by Side Diff: chrome/test/chromedriver/chromedriver.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/test/chromedriver/chromedriver.h" 5 #include "chrome/test/chromedriver/chromedriver.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 response_dict.Set("value", value->DeepCopy()); 29 response_dict.Set("value", value->DeepCopy());
30 response_dict.SetString("sessionId", session_id); 30 response_dict.SetString("sessionId", session_id);
31 std::string json; 31 std::string json;
32 base::JSONWriter::Write(&response_dict, response); 32 base::JSONWriter::Write(&response_dict, response);
33 } 33 }
34 34
35 void SetError(const std::string& error_msg, 35 void SetError(const std::string& error_msg,
36 std::string* response) { 36 std::string* response) {
37 base::DictionaryValue value; 37 base::DictionaryValue value;
38 value.SetString("message", error_msg); 38 value.SetString("message", error_msg);
39 SetResponse(kUnknownError, &value, "", response); 39 SetResponse(kUnknownError, &value, std::string(), response);
40 } 40 }
41 41
42 } // namespace 42 } // namespace
43 43
44 void Init(scoped_ptr<CommandExecutor> executor) { 44 void Init(scoped_ptr<CommandExecutor> executor) {
45 g_command_executor = executor.release(); 45 g_command_executor = executor.release();
46 // We do not call CommandExecutor::Init here because you can't do some things 46 // We do not call CommandExecutor::Init here because you can't do some things
47 // (e.g., creating threads) during DLL loading on Windows. 47 // (e.g., creating threads) during DLL loading on Windows.
48 } 48 }
49 49
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // 3. Add Chrome command-line switch for socket/pipe that Chrome listens 113 // 3. Add Chrome command-line switch for socket/pipe that Chrome listens
114 // to and exits if the pipe is closed. This is how the old 114 // to and exits if the pipe is closed. This is how the old
115 // TestingAutomationProvider worked. However, this doesn't clean up 115 // TestingAutomationProvider worked. However, this doesn't clean up
116 // temp directories, unless we make Chrome clean its own directory too. 116 // temp directories, unless we make Chrome clean its own directory too.
117 // If Chrome crashes the directory would be leaked. 117 // If Chrome crashes the directory would be leaked.
118 base::DictionaryValue params; 118 base::DictionaryValue params;
119 StatusCode status_code; 119 StatusCode status_code;
120 scoped_ptr<base::Value> value; 120 scoped_ptr<base::Value> value;
121 std::string session_id; 121 std::string session_id;
122 g_command_executor->ExecuteCommand( 122 g_command_executor->ExecuteCommand(
123 "quitAll", params, "", &status_code, &value, &session_id); 123 "quitAll", params, std::string(), &status_code, &value, &session_id);
124 delete g_command_executor; 124 delete g_command_executor;
125 } 125 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/web_view_impl_unittest.cc ('k') | chrome/test/chromedriver/chromedriver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698