| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser/net/resolve_proxy_msg_helper.h" | 5 #include "chrome/browser/net/resolve_proxy_msg_helper.h" |
| 6 | 6 |
| 7 #include "base/waitable_event.h" | 7 #include "base/waitable_event.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/proxy/proxy_config_service.h" | 9 #include "net/proxy/proxy_config_service.h" |
| 10 #include "net/proxy/proxy_resolver.h" | 10 #include "net/proxy/proxy_resolver.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 if (is_blocked_) | 37 if (is_blocked_) |
| 38 event_.Wait(); | 38 event_.Wait(); |
| 39 results->UseNamedProxy(query_url.host()); | 39 results->UseNamedProxy(query_url.host()); |
| 40 return net::OK; | 40 return net::OK; |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual void CancelRequest(RequestHandle request) { | 43 virtual void CancelRequest(RequestHandle request) { |
| 44 NOTREACHED(); | 44 NOTREACHED(); |
| 45 } | 45 } |
| 46 | 46 |
| 47 virtual void SetPacScriptByUrlInternal(const GURL& pac_url) {} | 47 virtual int SetPacScript(const GURL& /*pac_url*/, |
| 48 const std::string& /*bytes*/, |
| 49 net::CompletionCallback* /*callback*/) { |
| 50 return net::OK; |
| 51 } |
| 48 | 52 |
| 49 void Block() { | 53 void Block() { |
| 50 is_blocked_ = true; | 54 is_blocked_ = true; |
| 51 event_.Reset(); | 55 event_.Reset(); |
| 52 } | 56 } |
| 53 | 57 |
| 54 void Unblock() { | 58 void Unblock() { |
| 55 is_blocked_ = false; | 59 is_blocked_ = false; |
| 56 event_.Signal(); | 60 event_.Signal(); |
| 57 } | 61 } |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 EXPECT_FALSE( | 368 EXPECT_FALSE( |
| 365 result1->TimedWaitUntilDone(base::TimeDelta::FromMilliseconds(2))); | 369 result1->TimedWaitUntilDone(base::TimeDelta::FromMilliseconds(2))); |
| 366 EXPECT_FALSE( | 370 EXPECT_FALSE( |
| 367 result2->TimedWaitUntilDone(base::TimeDelta::FromMilliseconds(2))); | 371 result2->TimedWaitUntilDone(base::TimeDelta::FromMilliseconds(2))); |
| 368 EXPECT_FALSE( | 372 EXPECT_FALSE( |
| 369 result3->TimedWaitUntilDone(base::TimeDelta::FromMilliseconds(2))); | 373 result3->TimedWaitUntilDone(base::TimeDelta::FromMilliseconds(2))); |
| 370 | 374 |
| 371 // It should also be the case that msg1, msg2, msg3 were deleted by the | 375 // It should also be the case that msg1, msg2, msg3 were deleted by the |
| 372 // cancellation. (Else will show up as a leak in Purify). | 376 // cancellation. (Else will show up as a leak in Purify). |
| 373 } | 377 } |
| OLD | NEW |