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 #ifndef NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ | 5 #ifndef NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ |
6 #define NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ | 6 #define NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 | 301 |
302 const GURL& GetURL() const override; | 302 const GURL& GetURL() const override; |
303 | 303 |
304 ~FakeURLFetcher() override; | 304 ~FakeURLFetcher() override; |
305 | 305 |
306 private: | 306 private: |
307 // This is the method which actually calls the delegate that is passed in the | 307 // This is the method which actually calls the delegate that is passed in the |
308 // constructor. | 308 // constructor. |
309 void RunDelegate(); | 309 void RunDelegate(); |
310 | 310 |
311 int64 response_bytes_; | |
mef
2015/06/26 17:27:36
according to base/basictypes.h it should be int64_
twifkak
2015/06/26 17:48:57
Done.
| |
311 base::WeakPtrFactory<FakeURLFetcher> weak_factory_; | 312 base::WeakPtrFactory<FakeURLFetcher> weak_factory_; |
312 | 313 |
313 DISALLOW_COPY_AND_ASSIGN(FakeURLFetcher); | 314 DISALLOW_COPY_AND_ASSIGN(FakeURLFetcher); |
314 }; | 315 }; |
315 | 316 |
316 | 317 |
317 // FakeURLFetcherFactory is a factory for FakeURLFetcher objects. When | 318 // FakeURLFetcherFactory is a factory for FakeURLFetcher objects. When |
318 // instantiated, it sets itself up as the default URLFetcherFactory. Fake | 319 // instantiated, it sets itself up as the default URLFetcherFactory. Fake |
319 // responses for given URLs can be set using SetFakeResponse. | 320 // responses for given URLs can be set using SetFakeResponse. |
320 // | 321 // |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 // This method will create a real URLFetcher. | 456 // This method will create a real URLFetcher. |
456 scoped_ptr<URLFetcher> CreateURLFetcher(int id, | 457 scoped_ptr<URLFetcher> CreateURLFetcher(int id, |
457 const GURL& url, | 458 const GURL& url, |
458 URLFetcher::RequestType request_type, | 459 URLFetcher::RequestType request_type, |
459 URLFetcherDelegate* d) override; | 460 URLFetcherDelegate* d) override; |
460 }; | 461 }; |
461 | 462 |
462 } // namespace net | 463 } // namespace net |
463 | 464 |
464 #endif // NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ | 465 #endif // NET_URL_REQUEST_TEST_URL_FETCHER_FACTORY_H_ |
OLD | NEW |