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

Side by Side Diff: chrome/common/net/gaia/gaia_auth_fetcher_unittest.h

Issue 7006005: Move UrlFetcher to content. I originally thought that it's only used by chrome code, but turns o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_UNITTEST_H_ 8 #ifndef CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_UNITTEST_H_
9 #define CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_UNITTEST_H_ 9 #define CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_UNITTEST_H_
10 #pragma once 10 #pragma once
11 11
12 #include <string> 12 #include <string>
13 13
14 #include "chrome/common/net/gaia/gaia_auth_fetcher.h" 14 #include "chrome/common/net/gaia/gaia_auth_fetcher.h"
15 #include "chrome/common/net/url_fetcher.h"
16 #include "chrome/common/net/http_return.h" 15 #include "chrome/common/net/http_return.h"
16 #include "content/common/url_fetcher.h"
17 #include "net/url_request/url_request_status.h" 17 #include "net/url_request/url_request_status.h"
18 18
19 // Responds as though ClientLogin returned from the server. 19 // Responds as though ClientLogin returned from the server.
20 class MockFetcher : public URLFetcher { 20 class MockFetcher : public URLFetcher {
21 public: 21 public:
22 MockFetcher(bool success, 22 MockFetcher(bool success,
23 const GURL& url, 23 const GURL& url,
24 const std::string& results, 24 const std::string& results,
25 URLFetcher::RequestType request_type, 25 URLFetcher::RequestType request_type,
26 URLFetcher::Delegate* d); 26 URLFetcher::Delegate* d);
(...skipping 27 matching lines...) Expand all
54 void set_results(const std::string& results) { 54 void set_results(const std::string& results) {
55 results_ = results; 55 results_ = results;
56 } 56 }
57 private: 57 private:
58 bool success_; 58 bool success_;
59 std::string results_; 59 std::string results_;
60 DISALLOW_COPY_AND_ASSIGN(MockFactory); 60 DISALLOW_COPY_AND_ASSIGN(MockFactory);
61 }; 61 };
62 62
63 #endif // CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_UNITTEST_H_ 63 #endif // CHROME_COMMON_NET_GAIA_GAIA_AUTH_FETCHER_UNITTEST_H_
OLDNEW
« no previous file with comments | « chrome/common/net/gaia/gaia_auth_fetcher.h ('k') | chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698