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

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

Issue 1066453002: Refactor CryptAuth component to be more testable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cryptauth_securemessage
Patch Set: rename tests 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_api_call_flow.h
diff --git a/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h b/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h
index 7625a235769c3d3818fcc22f5c707182899a192e..f351aed609d1832efd2be89e19ada7bee3abc882 100644
--- a/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h
+++ b/components/proximity_auth/cryptauth/cryptauth_api_call_flow.h
@@ -22,17 +22,19 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
ResultCallback;
typedef base::Callback<void(const std::string& error_message)> ErrorCallback;
- CryptAuthApiCallFlow(const GURL& request_url);
+ CryptAuthApiCallFlow();
~CryptAuthApiCallFlow() override;
// Starts the API call.
+ // request_url: The URL endpoint of the API request.
// context: The URL context used to make the request.
// access_token: The access token for whom to make the to make the request.
// serialized_request: A serialized proto containing the request data.
// result_callback: Called when the flow completes successfully with a
// serialized response proto.
// error_callback: Called when the flow completes with an error.
- virtual void Start(net::URLRequestContextGetter* context,
+ virtual void Start(const GURL& request_url,
+ net::URLRequestContextGetter* context,
const std::string& access_token,
const std::string& serialized_request,
const ResultCallback& result_callback,
@@ -52,7 +54,7 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
private:
// The URL of the CryptAuth endpoint serving the request.
- const GURL request_url_;
+ GURL request_url_;
// Serialized request message proto that will be sent in the API request.
std::string serialized_request_;

Powered by Google App Engine
This is Rietveld 408576698