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

Side by Side Diff: chrome/browser/chromeos/attestation/platform_verification_flow.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_
6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ 6 #define CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_
7 7
8 #include <memory>
8 #include <set> 9 #include <set>
9 #include <string> 10 #include <string>
10 11
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 class AccountId; 19 class AccountId;
20 20
21 namespace content { 21 namespace content {
22 class WebContents; 22 class WebContents;
23 } 23 }
24 24
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // completes. The arguments to ChallengePlatformKey are in |context|. 190 // completes. The arguments to ChallengePlatformKey are in |context|.
191 // |account_id| identifies the user for which the certificate was requested. 191 // |account_id| identifies the user for which the certificate was requested.
192 // |operation_success| is true iff the certificate request operation 192 // |operation_success| is true iff the certificate request operation
193 // succeeded. |certificate_chain| holds the certificate for the platform key 193 // succeeded. |certificate_chain| holds the certificate for the platform key
194 // on success. If the certificate request was successful, this method invokes 194 // on success. If the certificate request was successful, this method invokes
195 // a request to sign the challenge. If the operation timed out prior to this 195 // a request to sign the challenge. If the operation timed out prior to this
196 // method being called, this method does nothing - notably, the callback is 196 // method being called, this method does nothing - notably, the callback is
197 // not invoked. 197 // not invoked.
198 void OnCertificateReady(const ChallengeContext& context, 198 void OnCertificateReady(const ChallengeContext& context,
199 const AccountId& account_id, 199 const AccountId& account_id,
200 scoped_ptr<base::Timer> timer, 200 std::unique_ptr<base::Timer> timer,
201 bool operation_success, 201 bool operation_success,
202 const std::string& certificate_chain); 202 const std::string& certificate_chain);
203 203
204 // A callback run after a constant delay to handle timeouts for lengthy 204 // A callback run after a constant delay to handle timeouts for lengthy
205 // certificate requests. |context.callback| will be invoked with a TIMEOUT 205 // certificate requests. |context.callback| will be invoked with a TIMEOUT
206 // result. 206 // result.
207 void OnCertificateTimeout(const ChallengeContext& context); 207 void OnCertificateTimeout(const ChallengeContext& context);
208 208
209 // A callback called when a challenge signing request has completed. The 209 // A callback called when a challenge signing request has completed. The
210 // |certificate_chain| is the platform certificate chain for the key which 210 // |certificate_chain| is the platform certificate chain for the key which
(...skipping 18 matching lines...) Expand all
229 // certificate this is expired or expiring soon. Returns the expiry status. 229 // certificate this is expired or expiring soon. Returns the expiry status.
230 ExpiryStatus CheckExpiry(const std::string& certificate_chain); 230 ExpiryStatus CheckExpiry(const std::string& certificate_chain);
231 231
232 // An AttestationFlow::CertificateCallback that handles renewal completion. 232 // An AttestationFlow::CertificateCallback that handles renewal completion.
233 // |old_certificate_chain| contains the chain that has been replaced. 233 // |old_certificate_chain| contains the chain that has been replaced.
234 void RenewCertificateCallback(const std::string& old_certificate_chain, 234 void RenewCertificateCallback(const std::string& old_certificate_chain,
235 bool operation_success, 235 bool operation_success,
236 const std::string& certificate_chain); 236 const std::string& certificate_chain);
237 237
238 AttestationFlow* attestation_flow_; 238 AttestationFlow* attestation_flow_;
239 scoped_ptr<AttestationFlow> default_attestation_flow_; 239 std::unique_ptr<AttestationFlow> default_attestation_flow_;
240 cryptohome::AsyncMethodCaller* async_caller_; 240 cryptohome::AsyncMethodCaller* async_caller_;
241 CryptohomeClient* cryptohome_client_; 241 CryptohomeClient* cryptohome_client_;
242 Delegate* delegate_; 242 Delegate* delegate_;
243 scoped_ptr<Delegate> default_delegate_; 243 std::unique_ptr<Delegate> default_delegate_;
244 base::TimeDelta timeout_delay_; 244 base::TimeDelta timeout_delay_;
245 std::set<std::string> renewals_in_progress_; 245 std::set<std::string> renewals_in_progress_;
246 246
247 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationFlow); 247 DISALLOW_COPY_AND_ASSIGN(PlatformVerificationFlow);
248 }; 248 };
249 249
250 } // namespace attestation 250 } // namespace attestation
251 } // namespace chromeos 251 } // namespace chromeos
252 252
253 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_ 253 #endif // CHROME_BROWSER_CHROMEOS_ATTESTATION_PLATFORM_VERIFICATION_FLOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698