Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: net/url_request/test_url_fetcher_factory.h

Issue 1212773002: Add prefetch UMA metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698