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_UI_APP_LIST_SPEECH_AUTH_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SPEECH_AUTH_HELPER_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_SPEECH_AUTH_HELPER_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_SPEECH_AUTH_HELPER_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 13 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
14 | 14 |
15 class Profile; | 15 class Profile; |
16 class ProfileOAuth2TokenService; | 16 class ProfileOAuth2TokenService; |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class Clock; | 19 class Clock; |
20 } | 20 } |
21 | 21 |
(...skipping 26 matching lines...) Expand all Loading... |
48 // Overridden from OAuth2TokenService::Observer: | 48 // Overridden from OAuth2TokenService::Observer: |
49 void OnRefreshTokenAvailable(const std::string& account_id) override; | 49 void OnRefreshTokenAvailable(const std::string& account_id) override; |
50 | 50 |
51 void ScheduleTokenFetch(const base::TimeDelta& fetch_delay); | 51 void ScheduleTokenFetch(const base::TimeDelta& fetch_delay); |
52 void FetchAuthToken(); | 52 void FetchAuthToken(); |
53 | 53 |
54 base::Clock* clock_; | 54 base::Clock* clock_; |
55 ProfileOAuth2TokenService* token_service_; | 55 ProfileOAuth2TokenService* token_service_; |
56 std::string authenticated_account_id_; | 56 std::string authenticated_account_id_; |
57 std::string auth_token_; | 57 std::string auth_token_; |
58 scoped_ptr<OAuth2TokenService::Request> auth_token_request_; | 58 std::unique_ptr<OAuth2TokenService::Request> auth_token_request_; |
59 | 59 |
60 base::WeakPtrFactory<SpeechAuthHelper> weak_factory_; | 60 base::WeakPtrFactory<SpeechAuthHelper> weak_factory_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(SpeechAuthHelper); | 62 DISALLOW_COPY_AND_ASSIGN(SpeechAuthHelper); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace app_list | 65 } // namespace app_list |
66 | 66 |
67 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_AUTH_HELPER_H_ | 67 #endif // CHROME_BROWSER_UI_APP_LIST_SPEECH_AUTH_HELPER_H_ |
OLD | NEW |