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

Unified Diff: components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h

Issue 1066453002: Refactor CryptAuth component to be more testable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cryptauth_securemessage
Patch Set: rebase Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h
diff --git a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h
index 6287dfeabd21e7800072a735e72b2cf831eaa1d0..c5d58f3e910a92fec7f0636b792625291bbe5ec5 100644
--- a/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h
+++ b/components/proximity_auth/cryptauth/cryptauth_access_token_fetcher.h
@@ -8,6 +8,9 @@
#include <string>
#include "base/callback_forward.h"
+#include "base/memory/scoped_ptr.h"
+
+class OAuth2TokenService;
namespace proximity_auth {
@@ -18,6 +21,12 @@ class CryptAuthAccessTokenFetcher {
public:
virtual ~CryptAuthAccessTokenFetcher() {}
+ // Creates a default CryptAuthAccessTokenFetcher instance.
+ // |token_service| is not owned and should outlive the created instance.
+ static scoped_ptr<CryptAuthAccessTokenFetcher> CreateDefault(
+ OAuth2TokenService* token_service,
+ const std::string& account_id);
+
// Fetches the access token asynchronously, invoking the callback upon
// completion. If the fetch fails, the callback will be invoked with an empty
// string.

Powered by Google App Engine
This is Rietveld 408576698