OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_frame/chrome_frame_automation.h" | 5 #include "chrome_frame/chrome_frame_automation.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 command_line->AppendSwitchPath(switches::kUserDataDir, | 284 command_line->AppendSwitchPath(switches::kUserDataDir, |
285 params->profile_path()); | 285 params->profile_path()); |
286 | 286 |
287 // Ensure that Chrome is running the specified version of chrome.dll. | 287 // Ensure that Chrome is running the specified version of chrome.dll. |
288 command_line->AppendSwitchNative(switches::kChromeVersion, | 288 command_line->AppendSwitchNative(switches::kChromeVersion, |
289 GetCurrentModuleVersion()); | 289 GetCurrentModuleVersion()); |
290 | 290 |
291 if (!params->language().empty()) | 291 if (!params->language().empty()) |
292 command_line->AppendSwitchNative(switches::kLang, params->language()); | 292 command_line->AppendSwitchNative(switches::kLang, params->language()); |
293 | 293 |
294 std::wstring command_line_string(command_line->command_line_string()); | 294 std::wstring command_line_string(command_line->GetCommandLineString()); |
295 // If there are any extra arguments, append them to the command line. | 295 // If there are any extra arguments, append them to the command line. |
296 if (!params->extra_arguments().empty()) { | 296 if (!params->extra_arguments().empty()) { |
297 command_line_string += L' ' + params->extra_arguments(); | 297 command_line_string += L' ' + params->extra_arguments(); |
298 } | 298 } |
299 | 299 |
300 automation_server_launch_start_time_ = base::TimeTicks::Now(); | 300 automation_server_launch_start_time_ = base::TimeTicks::Now(); |
301 | 301 |
302 if (!base::LaunchProcess(command_line_string, base::LaunchOptions(), NULL)) { | 302 if (!base::LaunchProcess(command_line_string, base::LaunchOptions(), NULL)) { |
303 // We have no code for launch failure. | 303 // We have no code for launch failure. |
304 launch_result_ = AUTOMATION_LAUNCH_RESULT_INVALID; | 304 launch_result_ = AUTOMATION_LAUNCH_RESULT_INVALID; |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 const net::URLRequestStatus& status) { | 1287 const net::URLRequestStatus& status) { |
1288 automation_server_->Send(new AutomationMsg_RequestEnd( | 1288 automation_server_->Send(new AutomationMsg_RequestEnd( |
1289 tab_->handle(), request_id, status)); | 1289 tab_->handle(), request_id, status)); |
1290 } | 1290 } |
1291 | 1291 |
1292 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, | 1292 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, |
1293 const GURL& url, const std::string& cookie_string, int cookie_id) { | 1293 const GURL& url, const std::string& cookie_string, int cookie_id) { |
1294 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( | 1294 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( |
1295 tab_->handle(), success, url, cookie_string, cookie_id)); | 1295 tab_->handle(), success, url, cookie_string, cookie_id)); |
1296 } | 1296 } |
OLD | NEW |