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

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

Issue 14263024: Logging API in chromedriver2. (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: 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
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"
11 #include "base/threading/platform_thread.h" 11 #include "base/threading/platform_thread.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "chrome/test/chromedriver/chrome/automation_extension.h" 13 #include "chrome/test/chromedriver/chrome/automation_extension.h"
14 #include "chrome/test/chromedriver/chrome/devtools_client.h" 14 #include "chrome/test/chromedriver/chrome/devtools_client.h"
15 #include "chrome/test/chromedriver/chrome/devtools_http_client.h" 15 #include "chrome/test/chromedriver/chrome/devtools_http_client.h"
16 #include "chrome/test/chromedriver/chrome/status.h" 16 #include "chrome/test/chromedriver/chrome/status.h"
17 #include "chrome/test/chromedriver/chrome/web_view_impl.h" 17 #include "chrome/test/chromedriver/chrome/web_view_impl.h"
18 18
19 ChromeDesktopImpl::ChromeDesktopImpl( 19 ChromeDesktopImpl::ChromeDesktopImpl(
20 scoped_ptr<DevToolsHttpClient> client, 20 scoped_ptr<DevToolsHttpClient> client,
21 const std::string& version, 21 const std::string& version,
22 int build_no, 22 int build_no,
23 const std::list<DevToolsEventLogger*>& devtools_event_loggers,
23 base::ProcessHandle process, 24 base::ProcessHandle process,
24 base::ScopedTempDir* user_data_dir, 25 base::ScopedTempDir* user_data_dir,
25 base::ScopedTempDir* extension_dir) 26 base::ScopedTempDir* extension_dir)
26 : ChromeImpl(client.Pass(), version, build_no), 27 : ChromeImpl(client.Pass(), version, build_no, devtools_event_loggers),
27 process_(process) { 28 process_(process) {
28 if (user_data_dir->IsValid()) 29 if (user_data_dir->IsValid())
29 CHECK(user_data_dir_.Set(user_data_dir->Take())); 30 CHECK(user_data_dir_.Set(user_data_dir->Take()));
30 if (extension_dir->IsValid()) 31 if (extension_dir->IsValid())
31 CHECK(extension_dir_.Set(extension_dir->Take())); 32 CHECK(extension_dir_.Set(extension_dir->Take()));
32 } 33 }
33 34
34 ChromeDesktopImpl::~ChromeDesktopImpl() { 35 ChromeDesktopImpl::~ChromeDesktopImpl() {
35 base::CloseProcessHandle(process_); 36 base::CloseProcessHandle(process_);
36 } 37 }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 84
84 Status ChromeDesktopImpl::Quit() { 85 Status ChromeDesktopImpl::Quit() {
85 if (!base::KillProcess(process_, 0, true)) { 86 if (!base::KillProcess(process_, 0, true)) {
86 int exit_code; 87 int exit_code;
87 if (base::GetTerminationStatus(process_, &exit_code) == 88 if (base::GetTerminationStatus(process_, &exit_code) ==
88 base::TERMINATION_STATUS_STILL_RUNNING) 89 base::TERMINATION_STATUS_STILL_RUNNING)
89 return Status(kUnknownError, "cannot kill Chrome"); 90 return Status(kUnknownError, "cannot kill Chrome");
90 } 91 }
91 return Status(kOk); 92 return Status(kOk);
92 } 93 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/chrome_desktop_impl.h ('k') | chrome/test/chromedriver/chrome/chrome_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698