OLD | NEW |
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_COOKIE_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_COOKIE_FETCHER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_COOKIE_FETCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_COOKIE_FETCHER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
| 11 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/chromeos/login/auth_response_handler.h" | 13 #include "chrome/browser/chromeos/login/auth_response_handler.h" |
13 #include "chrome/browser/chromeos/login/client_login_response_handler.h" | 14 #include "chrome/browser/chromeos/login/client_login_response_handler.h" |
14 #include "chrome/browser/chromeos/login/issue_response_handler.h" | 15 #include "chrome/browser/chromeos/login/issue_response_handler.h" |
15 | 16 |
16 | 17 |
17 class Profile; | 18 class Profile; |
18 | 19 |
19 namespace chromeos { | 20 namespace chromeos { |
20 | 21 |
(...skipping 14 matching lines...) Expand all Loading... |
35 AuthResponseHandler* i_handler); | 36 AuthResponseHandler* i_handler); |
36 | 37 |
37 // Given a newline-delineated SID/LSID pair of Google cookies (like | 38 // Given a newline-delineated SID/LSID pair of Google cookies (like |
38 // those that come back from ClientLogin), try to use them to fetch | 39 // those that come back from ClientLogin), try to use them to fetch |
39 // a full-fledged set of Google AuthN cookies. These cookies will wind up | 40 // a full-fledged set of Google AuthN cookies. These cookies will wind up |
40 // stored in the cookie jar associated with |profile_|, if we get them. | 41 // stored in the cookie jar associated with |profile_|, if we get them. |
41 // Either way, we end up by calling launcher_->DoLaunch() | 42 // Either way, we end up by calling launcher_->DoLaunch() |
42 void AttemptFetch(const std::string& credentials); | 43 void AttemptFetch(const std::string& credentials); |
43 | 44 |
44 // Overloaded from content::URLFetcherDelegate. | 45 // Overloaded from content::URLFetcherDelegate. |
45 virtual void OnURLFetchComplete(const content::URLFetcher* source); | 46 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
46 | 47 |
47 private: | 48 private: |
48 virtual ~CookieFetcher(); | 49 virtual ~CookieFetcher(); |
49 | 50 |
50 scoped_ptr<content::URLFetcher> fetcher_; | 51 scoped_ptr<content::URLFetcher> fetcher_; |
51 Profile* profile_; | 52 Profile* profile_; |
52 scoped_ptr<AuthResponseHandler> client_login_handler_; | 53 scoped_ptr<AuthResponseHandler> client_login_handler_; |
53 scoped_ptr<AuthResponseHandler> issue_handler_; | 54 scoped_ptr<AuthResponseHandler> issue_handler_; |
54 | 55 |
55 DISALLOW_COPY_AND_ASSIGN(CookieFetcher); | 56 DISALLOW_COPY_AND_ASSIGN(CookieFetcher); |
56 }; | 57 }; |
57 | 58 |
58 } // namespace chromeos | 59 } // namespace chromeos |
59 | 60 |
60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_COOKIE_FETCHER_H_ | 61 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_COOKIE_FETCHER_H_ |
OLD | NEW |