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

Side by Side Diff: chrome/test/chromedriver/session_commands.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
« no previous file with comments | « chrome/test/chromedriver/session.cc ('k') | chrome/test/chromedriver/window_commands.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/test/chromedriver/session_commands.h" 5 #include "chrome/test/chromedriver/session_commands.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 for (std::list<std::string>::const_iterator it = web_view_ids.begin(); 194 for (std::list<std::string>::const_iterator it = web_view_ids.begin();
195 it != web_view_ids.end(); ++it) { 195 it != web_view_ids.end(); ++it) {
196 scoped_ptr<base::Value> result; 196 scoped_ptr<base::Value> result;
197 WebView* web_view; 197 WebView* web_view;
198 status = session->chrome->GetWebViewById(*it, &web_view); 198 status = session->chrome->GetWebViewById(*it, &web_view);
199 if (status.IsError()) 199 if (status.IsError())
200 return status; 200 return status;
201 status = web_view->ConnectIfNecessary(); 201 status = web_view->ConnectIfNecessary();
202 if (status.IsError()) 202 if (status.IsError())
203 return status; 203 return status;
204 status = web_view->CallFunction("", kGetWindowNameScript, args, &result); 204 status = web_view->CallFunction(
205 std::string(), kGetWindowNameScript, args, &result);
205 if (status.IsError()) 206 if (status.IsError())
206 return status; 207 return status;
207 std::string window_name; 208 std::string window_name;
208 if (!result->GetAsString(&window_name)) 209 if (!result->GetAsString(&window_name))
209 return Status(kUnknownError, "failed to get window name"); 210 return Status(kUnknownError, "failed to get window name");
210 if (window_name == name) { 211 if (window_name == name) {
211 web_view_id = *it; 212 web_view_id = *it;
212 found = true; 213 found = true;
213 break; 214 break;
214 } 215 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 Session* session, 465 Session* session,
465 const base::DictionaryValue& params, 466 const base::DictionaryValue& params,
466 scoped_ptr<base::Value>* value) { 467 scoped_ptr<base::Value>* value) {
467 AutomationExtension* extension = NULL; 468 AutomationExtension* extension = NULL;
468 Status status = session->chrome->GetAutomationExtension(&extension); 469 Status status = session->chrome->GetAutomationExtension(&extension);
469 if (status.IsError()) 470 if (status.IsError())
470 return status; 471 return status;
471 472
472 return extension->MaximizeWindow(); 473 return extension->MaximizeWindow();
473 } 474 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session.cc ('k') | chrome/test/chromedriver/window_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698