| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_RESPONSE_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_RESPONSE_HANDLER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "content/public/common/url_fetcher_delegate.h" | |
| 12 | |
| 13 class GURL; | |
| 14 | |
| 15 namespace chromeos { | |
| 16 | |
| 17 // The success code specified by the HTTP spec. | |
| 18 extern const int kHttpSuccess; | |
| 19 | |
| 20 class AuthResponseHandler { | |
| 21 public: | |
| 22 AuthResponseHandler() {} | |
| 23 virtual ~AuthResponseHandler() {} | |
| 24 | |
| 25 // True if this object can handle responses from |url|, false otherwise. | |
| 26 virtual bool CanHandle(const GURL& url) = 0; | |
| 27 | |
| 28 // Caller takes ownership of return value. | |
| 29 // Takes in |to_process|, creates an appropriate URLFetcher to handle | |
| 30 // the next step, sets |catcher| to get called back when that fetcher is done. | |
| 31 // Starts the fetch and returns the fetcher, so the the caller can handle | |
| 32 // the object lifetime. | |
| 33 virtual content::URLFetcher* Handle(const std::string& to_process, | |
| 34 content::URLFetcherDelegate* catcher) = 0; | |
| 35 }; | |
| 36 | |
| 37 } // namespace chromeos | |
| 38 | |
| 39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_RESPONSE_HANDLER_H_ | |
| OLD | NEW |