Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initializer.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_LOGIN_EASY_UNLOCK_BOOTSTRAP_USER_CONTEXT_INITIAL IZER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_USER_CONTEXT_INITIAL IZER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_USER_CONTEXT_INITIAL IZER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_USER_CONTEXT_INITIAL IZER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h" 14 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_types.h"
15 #include "chrome/browser/signin/easy_unlock_auth_attempt.h" 15 #include "chrome/browser/signin/easy_unlock_auth_attempt.h"
16 #include "chrome/browser/signin/easy_unlock_service_observer.h" 16 #include "chrome/browser/signin/easy_unlock_service_observer.h"
17 #include "chromeos/login/auth/user_context.h" 17 #include "chromeos/login/auth/user_context.h"
18 #include "google_apis/gaia/gaia_oauth_client.h" 18 #include "google_apis/gaia/gaia_oauth_client.h"
19 19
20 class AccountId; 20 class AccountId;
21 21
22 namespace chromeos { 22 namespace chromeos {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Start refresh token and user info fetching. 62 // Start refresh token and user info fetching.
63 void StartTokenFetch(const std::string& auth_code); 63 void StartTokenFetch(const std::string& auth_code);
64 64
65 // gaia::GaiaOAuthClient::Delegate 65 // gaia::GaiaOAuthClient::Delegate
66 void OnGetTokensResponse(const std::string& refresh_token, 66 void OnGetTokensResponse(const std::string& refresh_token,
67 const std::string& access_token, 67 const std::string& access_token,
68 int expires_in_seconds) override; 68 int expires_in_seconds) override;
69 void OnRefreshTokenResponse(const std::string& access_token, 69 void OnRefreshTokenResponse(const std::string& access_token,
70 int expires_in_seconds) override; 70 int expires_in_seconds) override;
71 void OnGetUserInfoResponse( 71 void OnGetUserInfoResponse(
72 scoped_ptr<base::DictionaryValue> user_info) override; 72 std::unique_ptr<base::DictionaryValue> user_info) override;
73 void OnOAuthError() override; 73 void OnOAuthError() override;
74 void OnNetworkError(int response_code) override; 74 void OnNetworkError(int response_code) override;
75 75
76 // EasyUnlockServiceObserver: 76 // EasyUnlockServiceObserver:
77 void OnScreenlockStateChanged(proximity_auth::ScreenlockState state) override; 77 void OnScreenlockStateChanged(proximity_auth::ScreenlockState state) override;
78 78
79 CompleteCallback callback_; 79 CompleteCallback callback_;
80 scoped_ptr<gaia::GaiaOAuthClient> token_fetcher_; 80 std::unique_ptr<gaia::GaiaOAuthClient> token_fetcher_;
81 81
82 UserContext user_context_; 82 UserContext user_context_;
83 bool random_key_used_; 83 bool random_key_used_;
84 84
85 base::WeakPtrFactory<BootstrapUserContextInitializer> weak_ptr_factory_; 85 base::WeakPtrFactory<BootstrapUserContextInitializer> weak_ptr_factory_;
86 86
87 static CompleteCallback* complete_callback_for_testing_; 87 static CompleteCallback* complete_callback_for_testing_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(BootstrapUserContextInitializer); 89 DISALLOW_COPY_AND_ASSIGN(BootstrapUserContextInitializer);
90 }; 90 };
91 91
92 } // namespace chromeos 92 } // namespace chromeos
93 93
94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_USER_CONTEXT_INIT IALIZER_H_ 94 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_EASY_UNLOCK_BOOTSTRAP_USER_CONTEXT_INIT IALIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698