OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_POLICY_WILDCARD_LOGIN_CHECKER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_WILDCARD_LOGIN_CHECKER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_WILDCARD_LOGIN_CHECKER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_WILDCARD_LOGIN_CHECKER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/callback.h" | 10 #include "base/callback.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/time/time.h" | 12 #include "base/time/time.h" |
12 #include "components/policy/core/common/cloud/user_info_fetcher.h" | 13 #include "components/policy/core/common/cloud/user_info_fetcher.h" |
13 #include "google_apis/gaia/google_service_auth_error.h" | 14 #include "google_apis/gaia/google_service_auth_error.h" |
14 | 15 |
15 namespace net { | 16 namespace net { |
16 class URLRequestContextGetter; | 17 class URLRequestContextGetter; |
17 } | 18 } |
18 | 19 |
19 namespace policy { | 20 namespace policy { |
20 | 21 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const GoogleServiceAuthError& error); | 61 const GoogleServiceAuthError& error); |
61 | 62 |
62 // Starts the user info fetcher. | 63 // Starts the user info fetcher. |
63 void StartUserInfoFetcher(const std::string& access_token); | 64 void StartUserInfoFetcher(const std::string& access_token); |
64 | 65 |
65 // Handles the response of the check and calls ReportResult(). | 66 // Handles the response of the check and calls ReportResult(). |
66 void OnCheckCompleted(Result result); | 67 void OnCheckCompleted(Result result); |
67 | 68 |
68 StatusCallback callback_; | 69 StatusCallback callback_; |
69 | 70 |
70 scoped_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; | 71 std::unique_ptr<PolicyOAuth2TokenFetcher> token_fetcher_; |
71 scoped_ptr<UserInfoFetcher> user_info_fetcher_; | 72 std::unique_ptr<UserInfoFetcher> user_info_fetcher_; |
72 | 73 |
73 base::Time start_timestamp_; | 74 base::Time start_timestamp_; |
74 base::Time token_available_timestamp_; | 75 base::Time token_available_timestamp_; |
75 | 76 |
76 DISALLOW_COPY_AND_ASSIGN(WildcardLoginChecker); | 77 DISALLOW_COPY_AND_ASSIGN(WildcardLoginChecker); |
77 }; | 78 }; |
78 | 79 |
79 } // namespace policy | 80 } // namespace policy |
80 | 81 |
81 #endif // CHROME_BROWSER_CHROMEOS_POLICY_WILDCARD_LOGIN_CHECKER_H_ | 82 #endif // CHROME_BROWSER_CHROMEOS_POLICY_WILDCARD_LOGIN_CHECKER_H_ |
OLD | NEW |