| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/trace_event.h" | 10 #include "base/trace_event.h" |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 } | 606 } |
| 607 | 607 |
| 608 // Keep object in memory, while the window is alive. | 608 // Keep object in memory, while the window is alive. |
| 609 // Corresponding Release is in OnFinalMessage(); | 609 // Corresponding Release is in OnFinalMessage(); |
| 610 AddRef(); | 610 AddRef(); |
| 611 | 611 |
| 612 // Mark our state as initializing. We'll reach initialized once | 612 // Mark our state as initializing. We'll reach initialized once |
| 613 // InitializeComplete is called successfully. | 613 // InitializeComplete is called successfully. |
| 614 init_state_ = INITIALIZING; | 614 init_state_ = INITIALIZING; |
| 615 | 615 |
| 616 HRESULT hr = security_manager_.CreateInstance(CLSID_InternetSecurityManager); | 616 HRESULT hr = S_OK; |
| 617 // If chrome crashed and is being restarted, the security_manager_ object |
| 618 // might already be valid. |
| 619 if (security_manager_.get() == NULL) |
| 620 hr = security_manager_.CreateInstance(CLSID_InternetSecurityManager); |
| 621 |
| 617 if (FAILED(hr)) { | 622 if (FAILED(hr)) { |
| 618 NOTREACHED() << __FUNCTION__ | 623 NOTREACHED() << __FUNCTION__ |
| 619 << " Failed to create InternetSecurityManager. Error: 0x%x" | 624 << " Failed to create InternetSecurityManager. Error: 0x%x" |
| 620 << hr; | 625 << hr; |
| 621 } | 626 } |
| 622 | 627 |
| 623 if (chrome_launch_params_->url().is_valid()) | 628 if (chrome_launch_params_->url().is_valid()) |
| 624 navigate_after_initialization_ = false; | 629 navigate_after_initialization_ = false; |
| 625 | 630 |
| 626 proxy_factory_->GetAutomationServer(static_cast<LaunchDelegate*>(this), | 631 proxy_factory_->GetAutomationServer(static_cast<LaunchDelegate*>(this), |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 const URLRequestStatus& status) { | 1423 const URLRequestStatus& status) { |
| 1419 automation_server_->Send(new AutomationMsg_RequestEnd(0, tab_->handle(), | 1424 automation_server_->Send(new AutomationMsg_RequestEnd(0, tab_->handle(), |
| 1420 request_id, status)); | 1425 request_id, status)); |
| 1421 } | 1426 } |
| 1422 | 1427 |
| 1423 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, | 1428 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, |
| 1424 const GURL& url, const std::string& cookie_string, int cookie_id) { | 1429 const GURL& url, const std::string& cookie_string, int cookie_id) { |
| 1425 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse(0, | 1430 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse(0, |
| 1426 tab_->handle(), success, url, cookie_string, cookie_id)); | 1431 tab_->handle(), success, url, cookie_string, cookie_id)); |
| 1427 } | 1432 } |
| OLD | NEW |