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

Side by Side Diff: chrome/browser/chromeos/login/mock_auth_response_handler.h

Issue 8375039: Create a content::UrlFetcher interface that lives in content/public/common and convert users to i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 9 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 | 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/chromeos/login/auth_response_handler.h" 9 #include "chrome/browser/chromeos/login/auth_response_handler.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // method that will do this work. 27 // method that will do this work.
28 class MockAuthResponseHandler : public AuthResponseHandler { 28 class MockAuthResponseHandler : public AuthResponseHandler {
29 public: 29 public:
30 MockAuthResponseHandler(const GURL& url, 30 MockAuthResponseHandler(const GURL& url,
31 const net::URLRequestStatus& status, 31 const net::URLRequestStatus& status,
32 const int code, 32 const int code,
33 const std::string& data); 33 const std::string& data);
34 virtual ~MockAuthResponseHandler(); 34 virtual ~MockAuthResponseHandler();
35 35
36 MOCK_METHOD1(CanHandle, bool(const GURL& url)); 36 MOCK_METHOD1(CanHandle, bool(const GURL& url));
37 MOCK_METHOD2(Handle, URLFetcher*(const std::string& to_process, 37 MOCK_METHOD2(Handle, content::URLFetcher*(
38 content::URLFetcherDelegate* catcher)); 38 const std::string& to_process, content::URLFetcherDelegate* catcher));
39 39
40 URLFetcher* MockNetwork(std::string data, 40 URLFetcher* MockNetwork(std::string data,
41 content::URLFetcherDelegate* delegate); 41 content::URLFetcherDelegate* delegate);
42 42
43 private: 43 private:
44 const GURL remote_; 44 const GURL remote_;
45 const net::URLRequestStatus status_; 45 const net::URLRequestStatus status_;
46 const int http_response_code_; 46 const int http_response_code_;
47 const std::string data_; 47 const std::string data_;
48 48
49 static void CompleteFetch(content::URLFetcherDelegate* delegate, 49 static void CompleteFetch(content::URLFetcherDelegate* delegate,
50 const GURL remote, 50 const GURL remote,
51 const net::URLRequestStatus status, 51 const net::URLRequestStatus status,
52 const int http_response_code, 52 const int http_response_code,
53 const std::string data); 53 const std::string data);
54 54
55 DISALLOW_COPY_AND_ASSIGN(MockAuthResponseHandler); 55 DISALLOW_COPY_AND_ASSIGN(MockAuthResponseHandler);
56 }; 56 };
57 57
58 } // namespace chromeos 58 } // namespace chromeos
59 59
60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_ 60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/issue_response_handler.cc ('k') | chrome/browser/chromeos/login/mock_url_fetchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698