OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ARC_AUTH_ARC_MANUAL_AUTH_CODE_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_MANUAL_AUTH_CODE_FETCHER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_MANUAL_AUTH_CODE_FETCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_MANUAL_AUTH_CODE_FETCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 void Fetch(const FetchCallback& callback) override; | 33 void Fetch(const FetchCallback& callback) override; |
34 | 34 |
35 private: | 35 private: |
36 void FetchInternal(); | 36 void FetchInternal(); |
37 | 37 |
38 // Called when HTTP request gets ready. | 38 // Called when HTTP request gets ready. |
39 void OnContextPrepared(net::URLRequestContextGetter* request_context_getter); | 39 void OnContextPrepared(net::URLRequestContextGetter* request_context_getter); |
40 | 40 |
41 // ArcSupportHost::Observer: | 41 // ArcSupportHost::Observer: |
42 void OnAuthSucceeded(const std::string& auth_code) override; | 42 void OnAuthSucceeded(const std::string& auth_code) override; |
| 43 void OnAuthFailed() override; |
43 void OnRetryClicked() override; | 44 void OnRetryClicked() override; |
44 | 45 |
45 ArcAuthContext* const context_; | 46 ArcAuthContext* const context_; |
46 ArcSupportHost* const support_host_; | 47 ArcSupportHost* const support_host_; |
47 | 48 |
48 FetchCallback pending_callback_; | 49 FetchCallback pending_callback_; |
49 | 50 |
50 base::WeakPtrFactory<ArcManualAuthCodeFetcher> weak_ptr_factory_; | 51 base::WeakPtrFactory<ArcManualAuthCodeFetcher> weak_ptr_factory_; |
51 | 52 |
52 DISALLOW_COPY_AND_ASSIGN(ArcManualAuthCodeFetcher); | 53 DISALLOW_COPY_AND_ASSIGN(ArcManualAuthCodeFetcher); |
53 }; | 54 }; |
54 | 55 |
55 } // namespace arc | 56 } // namespace arc |
56 | 57 |
57 #endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_MANUAL_AUTH_CODE_FETCHER_H_ | 58 #endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_MANUAL_AUTH_CODE_FETCHER_H_ |
OLD | NEW |