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

Unified Diff: components/cryptauth/cryptauth_api_call_flow.h

Issue 2888053003: Network traffic annotation added to OAuth2ApiCallFlow and its subclasses. (Closed)
Patch Set: Annotations updated. Created 3 years, 6 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
« no previous file with comments | « no previous file | components/cryptauth/cryptauth_api_call_flow.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cryptauth/cryptauth_api_call_flow.h
diff --git a/components/cryptauth/cryptauth_api_call_flow.h b/components/cryptauth/cryptauth_api_call_flow.h
index 07a487edca68d7f28ecfb86649ed6c03236db1dc..ce5e34d294efdd31a8c52f6dc673d799667c1807 100644
--- a/components/cryptauth/cryptauth_api_call_flow.h
+++ b/components/cryptauth/cryptauth_api_call_flow.h
@@ -40,6 +40,14 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
const ResultCallback& result_callback,
const ErrorCallback& error_callback);
+ void SetPartialNetworkTrafficAnnotation(
+ const net::PartialNetworkTrafficAnnotationTag&
+ partial_traffic_annotation) {
+ partial_network_annotation_.reset(
+ new net::PartialNetworkTrafficAnnotationTag(
+ partial_traffic_annotation));
+ }
+
protected:
// Reduce the visibility of OAuth2ApiCallFlow::Start() to avoid exposing
// overloaded methods.
@@ -53,6 +61,8 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
const std::string& body) override;
void ProcessApiCallSuccess(const net::URLFetcher* source) override;
void ProcessApiCallFailure(const net::URLFetcher* source) override;
+ net::PartialNetworkTrafficAnnotationTag GetNetworkTrafficAnnotationTag()
+ override;
private:
// The URL of the CryptAuth endpoint serving the request.
@@ -68,6 +78,9 @@ class CryptAuthApiCallFlow : public OAuth2ApiCallFlow {
// Callback invoked with an error message when the flow fails.
ErrorCallback error_callback_;
+ std::unique_ptr<net::PartialNetworkTrafficAnnotationTag>
+ partial_network_annotation_;
+
DISALLOW_COPY_AND_ASSIGN(CryptAuthApiCallFlow);
};
« no previous file with comments | « no previous file | components/cryptauth/cryptauth_api_call_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698