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

Unified Diff: chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc

Issue 2900673002: Network traffic annotation added to one_google_bar. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc
diff --git a/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc b/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc
index 41cdec8f7afde09915d29b5f6028ec1fdb87c0cb..28f1b09925dfedaa4f2961c5d95cd23ca96af0e5 100644
--- a/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc
+++ b/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc
@@ -27,6 +27,7 @@
#include "google_apis/google_api_keys.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -268,7 +269,28 @@ void OneGoogleBarFetcherImpl::AuthenticatedURLFetcher::GotAccessToken(
bool use_oauth = !access_token.empty();
GURL url = GetApiUrl(use_oauth);
- url_fetcher_ = net::URLFetcher::Create(0, url, net::URLFetcher::POST, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
sfiera 2017/05/22 12:48:17 one_google_bar_service
Ramin Halavati 2017/05/22 13:11:48 Done.
+ semantics {
+ sender: "..."
sfiera 2017/05/22 12:48:17 One Google Bar Service
Ramin Halavati 2017/05/22 13:11:48 Done.
+ description: "..."
sfiera 2017/05/22 12:48:16 Downloads the "One Google" bar if Google is the co
sfiera 2017/05/22 12:51:37 Ah, with another look, I see we reference an API k
Ramin Halavati 2017/05/22 13:11:48 I am confused, could you please rephrase?
+ trigger: "..."
sfiera 2017/05/22 12:48:17 Displaying the new tab page on Desktop
Ramin Halavati 2017/05/22 13:11:48 Done.
+ data: "..."
sfiera 2017/05/22 12:48:17 Credentials of signed-in user
Ramin Halavati 2017/05/22 13:11:48 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
+ }
+ policy {
+ cookies_allowed: false
+ setting: "..."
sfiera 2017/05/22 12:48:16 Signing out of Chrome or choosing a non-Google sea
Ramin Halavati 2017/05/22 13:11:48 Done.
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
sfiera 2017/05/22 12:48:17 DefaultSearchProviderEnabled { policy_options {m
Ramin Halavati 2017/05/22 13:11:49 Done.
+ }
+ policy_exception_justification: "..."
+ })");
+ url_fetcher_ = net::URLFetcher::Create(0, url, net::URLFetcher::POST, this,
+ traffic_annotation);
url_fetcher_->SetRequestContext(request_context_);
url_fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SEND_AUTH_DATA |
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698