OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 base::Bind(&AutomationProxyCacheEntry::RemoveDelegate, | 512 base::Bind(&AutomationProxyCacheEntry::RemoveDelegate, |
513 base::Unretained(entry), delegate, &done, &last_delegate)); | 513 base::Unretained(entry), delegate, &done, &last_delegate)); |
514 done.Wait(); | 514 done.Wait(); |
515 } | 515 } |
516 | 516 |
517 if (last_delegate) { | 517 if (last_delegate) { |
518 lock_.Acquire(); | 518 lock_.Acquire(); |
519 Vector::ContainerType::iterator it = std::find(proxies_.container().begin(), | 519 Vector::ContainerType::iterator it = std::find(proxies_.container().begin(), |
520 proxies_.container().end(), | 520 proxies_.container().end(), |
521 entry); | 521 entry); |
522 proxies_.container().erase(it); | 522 DLOG_IF(ERROR, it == proxies_.container().end()) |
| 523 << "Proxy wasn't found. Proxy map is likely empty (size=" |
| 524 << proxies_.container().size() << ")."; |
| 525 if (it != proxies_.container().end()) |
| 526 proxies_.container().erase(it); |
| 527 |
523 lock_.Release(); | 528 lock_.Release(); |
524 } | 529 } |
525 | 530 |
526 entry->Release(); | 531 entry->Release(); |
527 | 532 |
528 return true; | 533 return true; |
529 } | 534 } |
530 | 535 |
531 static base::LazyInstance<ProxyFactory>::Leaky | 536 static base::LazyInstance<ProxyFactory>::Leaky |
532 g_proxy_factory = LAZY_INSTANCE_INITIALIZER; | 537 g_proxy_factory = LAZY_INSTANCE_INITIALIZER; |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1324 const net::URLRequestStatus& status) { | 1329 const net::URLRequestStatus& status) { |
1325 automation_server_->Send(new AutomationMsg_RequestEnd( | 1330 automation_server_->Send(new AutomationMsg_RequestEnd( |
1326 tab_->handle(), request_id, status)); | 1331 tab_->handle(), request_id, status)); |
1327 } | 1332 } |
1328 | 1333 |
1329 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, | 1334 void ChromeFrameAutomationClient::OnCookiesRetrieved(bool success, |
1330 const GURL& url, const std::string& cookie_string, int cookie_id) { | 1335 const GURL& url, const std::string& cookie_string, int cookie_id) { |
1331 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( | 1336 automation_server_->Send(new AutomationMsg_GetCookiesHostResponse( |
1332 tab_->handle(), success, url, cookie_string, cookie_id)); | 1337 tab_->handle(), success, url, cookie_string, cookie_id)); |
1333 } | 1338 } |
OLD | NEW |