| 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 "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 launch_delegates_.end(), delegate); | 391 launch_delegates_.end(), delegate); |
| 392 if (it == launch_delegates_.end()) { | 392 if (it == launch_delegates_.end()) { |
| 393 NOTREACHED(); | 393 NOTREACHED(); |
| 394 } else { | 394 } else { |
| 395 if (launch_delegates_.size() == 1) { | 395 if (launch_delegates_.size() == 1) { |
| 396 *was_last_delegate = true; | 396 *was_last_delegate = true; |
| 397 | 397 |
| 398 if (snapshots_) | 398 if (snapshots_) |
| 399 SendUMAData(); | 399 SendUMAData(); |
| 400 | 400 |
| 401 // Take down the proxy since we no longer have any clients. | |
| 402 proxy_.reset(NULL); | |
| 403 | |
| 404 // Process pending notifications. | 401 // Process pending notifications. |
| 405 thread_->message_loop()->RunAllPending(); | 402 thread_->message_loop()->RunAllPending(); |
| 403 |
| 404 // Take down the proxy since we no longer have any clients. |
| 405 // Make sure we only do this once all pending messages have been cleared. |
| 406 proxy_.reset(NULL); |
| 406 } | 407 } |
| 407 // Be careful to remove from the list after running pending | 408 // Be careful to remove from the list after running pending |
| 408 // tasks. Otherwise the delegate being removed might miss out | 409 // tasks. Otherwise the delegate being removed might miss out |
| 409 // on pending notifications such as LaunchComplete. | 410 // on pending notifications such as LaunchComplete. |
| 410 launch_delegates_.erase(it); | 411 launch_delegates_.erase(it); |
| 411 } | 412 } |
| 412 | 413 |
| 413 done->Signal(); | 414 done->Signal(); |
| 414 } | 415 } |
| 415 | 416 |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 const net::URLRequestStatus& status) { | 1461 const net::URLRequestStatus& status) { |
| 1461 automation_server_->Send(new AutomationMsg_RequestEnd( | 1462 automation_server_->Send(new AutomationMsg_RequestEnd( |
| 1462 tab_->handle(), request_id, status)); | 1463 tab_->handle(), request_id, status)); |
| 1463 } | 1464 } |
| 1464 | 1465 |
| 1465 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, | 1466 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, |
| 1466 const GURL& url, const std::string& cookie_string, int cookie_id) { | 1467 const GURL& url, const std::string& cookie_string, int cookie_id) { |
| 1467 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( | 1468 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( |
| 1468 tab_->handle(), success, url, cookie_string, cookie_id)); | 1469 tab_->handle(), success, url, cookie_string, cookie_id)); |
| 1469 } | 1470 } |
| OLD | NEW |