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 "net/proxy/proxy_script_fetcher_impl.h" | 5 #include "net/proxy/proxy_script_fetcher_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 virtual bool OnCanSetCookie(const URLRequest& request, | 176 virtual bool OnCanSetCookie(const URLRequest& request, |
177 const std::string& cookie_line, | 177 const std::string& cookie_line, |
178 CookieOptions* options) OVERRIDE { | 178 CookieOptions* options) OVERRIDE { |
179 return true; | 179 return true; |
180 } | 180 } |
181 | 181 |
182 virtual bool OnCanAccessFile(const net::URLRequest& request, | 182 virtual bool OnCanAccessFile(const net::URLRequest& request, |
183 const FilePath& path) const OVERRIDE { | 183 const FilePath& path) const OVERRIDE { |
184 return true; | 184 return true; |
185 } | 185 } |
| 186 virtual bool OnCanThrottleRequest(const URLRequest& request) const OVERRIDE { |
| 187 return false; |
| 188 } |
186 | 189 |
187 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); | 190 DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); |
188 }; | 191 }; |
189 | 192 |
190 } // namespace | 193 } // namespace |
191 | 194 |
192 class ProxyScriptFetcherImplTest : public PlatformTest { | 195 class ProxyScriptFetcherImplTest : public PlatformTest { |
193 public: | 196 public: |
194 ProxyScriptFetcherImplTest() | 197 ProxyScriptFetcherImplTest() |
195 : test_server_(TestServer::TYPE_HTTP, | 198 : test_server_(TestServer::TYPE_HTTP, |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 { | 476 { |
474 GURL url(kEncodedUrlBroken); | 477 GURL url(kEncodedUrlBroken); |
475 string16 text; | 478 string16 text; |
476 TestCompletionCallback callback; | 479 TestCompletionCallback callback; |
477 int result = pac_fetcher.Fetch(url, &text, callback.callback()); | 480 int result = pac_fetcher.Fetch(url, &text, callback.callback()); |
478 EXPECT_EQ(ERR_FAILED, result); | 481 EXPECT_EQ(ERR_FAILED, result); |
479 } | 482 } |
480 } | 483 } |
481 | 484 |
482 } // namespace net | 485 } // namespace net |
OLD | NEW |