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

Side by Side Diff: chrome/test/chromedriver/chrome/chrome_desktop_impl.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) 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/chrome/chrome_desktop_impl.h" 5 #include "chrome/test/chromedriver/chrome/chrome_desktop_impl.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (id.empty()) 60 if (id.empty())
61 return Status(kUnknownError, "automation extension cannot be found"); 61 return Status(kUnknownError, "automation extension cannot be found");
62 62
63 scoped_ptr<WebView> web_view(new WebViewImpl( 63 scoped_ptr<WebView> web_view(new WebViewImpl(
64 id, devtools_http_client_->CreateClient(id))); 64 id, devtools_http_client_->CreateClient(id)));
65 Status status = web_view->ConnectIfNecessary(); 65 Status status = web_view->ConnectIfNecessary();
66 if (status.IsError()) 66 if (status.IsError())
67 return status; 67 return status;
68 68
69 // Wait for the extension background page to load. 69 // Wait for the extension background page to load.
70 status = web_view->WaitForPendingNavigations(""); 70 status = web_view->WaitForPendingNavigations(std::string());
71 if (status.IsError()) 71 if (status.IsError())
72 return status; 72 return status;
73 73
74 automation_extension_.reset(new AutomationExtension(web_view.Pass())); 74 automation_extension_.reset(new AutomationExtension(web_view.Pass()));
75 } 75 }
76 *extension = automation_extension_.get(); 76 *extension = automation_extension_.get();
77 return Status(kOk); 77 return Status(kOk);
78 } 78 }
79 79
80 std::string ChromeDesktopImpl::GetOperatingSystemName() { 80 std::string ChromeDesktopImpl::GetOperatingSystemName() {
81 return base::SysInfo::OperatingSystemName(); 81 return base::SysInfo::OperatingSystemName();
82 } 82 }
83 83
84 Status ChromeDesktopImpl::Quit() { 84 Status ChromeDesktopImpl::Quit() {
85 if (!base::KillProcess(process_, 0, true)) { 85 if (!base::KillProcess(process_, 0, true)) {
86 int exit_code; 86 int exit_code;
87 if (base::GetTerminationStatus(process_, &exit_code) == 87 if (base::GetTerminationStatus(process_, &exit_code) ==
88 base::TERMINATION_STATUS_STILL_RUNNING) 88 base::TERMINATION_STATUS_STILL_RUNNING)
89 return Status(kUnknownError, "cannot kill Chrome"); 89 return Status(kUnknownError, "cannot kill Chrome");
90 } 90 }
91 return Status(kOk); 91 return Status(kOk);
92 } 92 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/automation_extension.cc ('k') | chrome/test/chromedriver/chrome/devtools_http_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698