Commit e722fcb8 authored by Jeroen Dhollander's avatar Jeroen Dhollander Committed by Commit Bot

Fix example code of PrimaryAccountAccessTokenFetcher

This example code is really useful, but it contained a few minor
C++ mistakes.

Bug: N/A
Test: compiled
Change-Id: If0b110c89657a4f018e2b406b0e4b2213a4fe420
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354594
Auto-Submit: Jeroen Dhollander <jeroendh@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803068}
parent 47fa6a6d
...@@ -76,11 +76,11 @@ struct AccessTokenInfo; ...@@ -76,11 +76,11 @@ struct AccessTokenInfo;
// // Choose the mode in which to fetch the access token: // // Choose the mode in which to fetch the access token:
// // see AccessTokenFetcher::Mode below for definitions. // // see AccessTokenFetcher::Mode below for definitions.
// auto mode = // auto mode =
// signin::PrimaryAccountAccessTokenFetcher::Mode::kWaitUntilAvailable; // PrimaryAccountAccessTokenFetcher::Mode::kWaitUntilAvailable;
// // Create the fetcher. // // Create the fetcher.
// access_token_fetcher_ = // access_token_fetcher_ =
// std::make_unique<PrimaryAccountAccessTokenFetcher( // std::make_unique<PrimaryAccountAccessTokenFetcher>(
// /*consumer_name=*/"MyClass", // /*consumer_name=*/"MyClass",
// identity_manager_, // identity_manager_,
// scopes, // scopes,
...@@ -91,7 +91,7 @@ struct AccessTokenInfo; ...@@ -91,7 +91,7 @@ struct AccessTokenInfo;
// mode); // mode);
// //
// } // }
// MyClass::OnAccessTokenRequestCompleted( // void MyClass::OnAccessTokenRequestCompleted(
// GoogleServiceAuthError error, AccessTokenInfo access_token_info) { // GoogleServiceAuthError error, AccessTokenInfo access_token_info) {
// // It is safe to destroy |access_token_fetcher_| from this callback. // // It is safe to destroy |access_token_fetcher_| from this callback.
// access_token_fetcher_.reset(); // access_token_fetcher_.reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment