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

Unified Diff: components/cryptauth/cryptauth_api_call_flow.cc

Issue 2888053003: Network traffic annotation added to OAuth2ApiCallFlow and its subclasses. (Closed)
Patch Set: Created 3 years, 7 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/cryptauth/cryptauth_api_call_flow.cc
diff --git a/components/cryptauth/cryptauth_api_call_flow.cc b/components/cryptauth/cryptauth_api_call_flow.cc
index cfacd8992bb756a5992fea97af5af287d297879e..0c51f77af12205a84129d2a8bc2841de5d27ba61 100644
--- a/components/cryptauth/cryptauth_api_call_flow.cc
+++ b/components/cryptauth/cryptauth_api_call_flow.cc
@@ -6,6 +6,7 @@
#include "base/strings/string_number_conversions.h"
#include "components/proximity_auth/logging/logging.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
namespace cryptauth {
@@ -34,7 +35,28 @@ void CryptAuthApiCallFlow::Start(const GURL& request_url,
serialized_request_ = serialized_request;
result_callback_ = result_callback;
error_callback_ = error_callback;
- OAuth2ApiCallFlow::Start(context, access_token);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
+ description: "..."
Tim Song 2017/05/17 19:10:37 This class is a generic wrapper for all API calls
Ramin Halavati 2017/05/24 13:04:41 Done.
+ trigger: "..."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: "..."
+ setting: "..."
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
+ })");
+ OAuth2ApiCallFlow::Start(context, access_token, traffic_annotation);
}
GURL CryptAuthApiCallFlow::CreateApiCallUrl() {

Powered by Google App Engine
This is Rietveld 408576698