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

Side by Side Diff: google_apis/gaia/mock_url_fetcher_factory.h

Issue 625293003: replace OVERRIDE and FINAL with override and final in google_apis/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase on master Created 6 years, 2 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 // A collection of classes that are useful when testing things that use a 5 // A collection of classes that are useful when testing things that use a
6 // GaiaAuthFetcher. 6 // GaiaAuthFetcher.
7 7
8 #ifndef GOOGLE_APIS_GAIA_MOCK_URL_FETCHER_FACTORY_H_ 8 #ifndef GOOGLE_APIS_GAIA_MOCK_URL_FETCHER_FACTORY_H_
9 #define GOOGLE_APIS_GAIA_MOCK_URL_FETCHER_FACTORY_H_ 9 #define GOOGLE_APIS_GAIA_MOCK_URL_FETCHER_FACTORY_H_
10 10
(...skipping 15 matching lines...) Expand all
26 MockFetcher(const GURL& url, 26 MockFetcher(const GURL& url,
27 const net::URLRequestStatus& status, 27 const net::URLRequestStatus& status,
28 int response_code, 28 int response_code,
29 const net::ResponseCookies& cookies, 29 const net::ResponseCookies& cookies,
30 const std::string& results, 30 const std::string& results,
31 net::URLFetcher::RequestType request_type, 31 net::URLFetcher::RequestType request_type,
32 net::URLFetcherDelegate* d); 32 net::URLFetcherDelegate* d);
33 33
34 virtual ~MockFetcher(); 34 virtual ~MockFetcher();
35 35
36 virtual void Start() OVERRIDE; 36 virtual void Start() override;
37 37
38 private: 38 private:
39 DISALLOW_COPY_AND_ASSIGN(MockFetcher); 39 DISALLOW_COPY_AND_ASSIGN(MockFetcher);
40 }; 40 };
41 41
42 template<typename T> 42 template<typename T>
43 class MockURLFetcherFactory : public net::URLFetcherFactory, 43 class MockURLFetcherFactory : public net::URLFetcherFactory,
44 public net::ScopedURLFetcherFactory { 44 public net::ScopedURLFetcherFactory {
45 public: 45 public:
46 MockURLFetcherFactory() 46 MockURLFetcherFactory()
47 : net::ScopedURLFetcherFactory(this), 47 : net::ScopedURLFetcherFactory(this),
48 success_(true) { 48 success_(true) {
49 } 49 }
50 ~MockURLFetcherFactory() {} 50 ~MockURLFetcherFactory() {}
51 net::URLFetcher* CreateURLFetcher( 51 net::URLFetcher* CreateURLFetcher(
52 int id, 52 int id,
53 const GURL& url, 53 const GURL& url,
54 net::URLFetcher::RequestType request_type, 54 net::URLFetcher::RequestType request_type,
55 net::URLFetcherDelegate* d) OVERRIDE { 55 net::URLFetcherDelegate* d) override {
56 return new T(success_, url, results_, request_type, d); 56 return new T(success_, url, results_, request_type, d);
57 } 57 }
58 void set_success(bool success) { 58 void set_success(bool success) {
59 success_ = success; 59 success_ = success;
60 } 60 }
61 void set_results(const std::string& results) { 61 void set_results(const std::string& results) {
62 results_ = results; 62 results_ = results;
63 } 63 }
64 private: 64 private:
65 bool success_; 65 bool success_;
66 std::string results_; 66 std::string results_;
67 DISALLOW_COPY_AND_ASSIGN(MockURLFetcherFactory); 67 DISALLOW_COPY_AND_ASSIGN(MockURLFetcherFactory);
68 }; 68 };
69 69
70 #endif // GOOGLE_APIS_GAIA_MOCK_URL_FETCHER_FACTORY_H_ 70 #endif // GOOGLE_APIS_GAIA_MOCK_URL_FETCHER_FACTORY_H_
OLDNEW
« no previous file with comments | « google_apis/gaia/merge_session_helper.h ('k') | google_apis/gaia/oauth2_access_token_fetcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698