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

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

Issue 8373021: Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old U... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync and remove unncessary forward declares Created 9 years, 1 month 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 17 matching lines...) Expand all
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, URLFetcher*(const std::string& to_process,
38 URLFetcher::Delegate* catcher)); 38 content::URLFetcherDelegate* catcher));
39 39
40 URLFetcher* MockNetwork(std::string data, URLFetcher::Delegate* delegate); 40 URLFetcher* MockNetwork(std::string data,
41 content::URLFetcherDelegate* delegate);
41 42
42 private: 43 private:
43 const GURL remote_; 44 const GURL remote_;
44 const net::URLRequestStatus status_; 45 const net::URLRequestStatus status_;
45 const int http_response_code_; 46 const int http_response_code_;
46 const std::string data_; 47 const std::string data_;
47 48
48 static void CompleteFetch(URLFetcher::Delegate* delegate, 49 static void CompleteFetch(content::URLFetcherDelegate* delegate,
49 const GURL remote, 50 const GURL remote,
50 const net::URLRequestStatus status, 51 const net::URLRequestStatus status,
51 const int http_response_code, 52 const int http_response_code,
52 const std::string data); 53 const std::string data);
53 54
54 DISALLOW_COPY_AND_ASSIGN(MockAuthResponseHandler); 55 DISALLOW_COPY_AND_ASSIGN(MockAuthResponseHandler);
55 }; 56 };
56 57
57 } // namespace chromeos 58 } // namespace chromeos
58 59
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_ 60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTH_RESPONSE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698