OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "net/proxy/proxy_resolver_v8_tracing.h" | 5 #include "net/proxy/proxy_resolver_v8_tracing.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 class MockErrorObserver : public ProxyResolverErrorObserver { | 69 class MockErrorObserver : public ProxyResolverErrorObserver { |
70 public: | 70 public: |
71 MockErrorObserver() : event_(true, false) {} | 71 MockErrorObserver() : event_(true, false) {} |
72 | 72 |
73 virtual void OnPACScriptError(int line_number, | 73 virtual void OnPACScriptError(int line_number, |
74 const base::string16& error) OVERRIDE { | 74 const base::string16& error) OVERRIDE { |
75 { | 75 { |
76 base::AutoLock l(lock_); | 76 base::AutoLock l(lock_); |
77 output += base::StringPrintf("Error: line %d: %s\n", line_number, | 77 output += base::StringPrintf("Error: line %d: %s\n", line_number, |
78 UTF16ToASCII(error).c_str()); | 78 base::UTF16ToASCII(error).c_str()); |
79 } | 79 } |
80 event_.Signal(); | 80 event_.Signal(); |
81 } | 81 } |
82 | 82 |
83 std::string GetOutput() { | 83 std::string GetOutput() { |
84 base::AutoLock l(lock_); | 84 base::AutoLock l(lock_); |
85 return output; | 85 return output; |
86 } | 86 } |
87 | 87 |
88 void WaitForOutput() { | 88 void WaitForOutput() { |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 proxy_uri.substr(0, proxy_uri.find(':') + 1)); | 1090 proxy_uri.substr(0, proxy_uri.find(':') + 1)); |
1091 } else { | 1091 } else { |
1092 NOTREACHED(); | 1092 NOTREACHED(); |
1093 } | 1093 } |
1094 } | 1094 } |
1095 } | 1095 } |
1096 | 1096 |
1097 } // namespace | 1097 } // namespace |
1098 | 1098 |
1099 } // namespace net | 1099 } // namespace net |
OLD | NEW |