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

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: Annotation updated. 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..3a6352e9d290c2162ed84fe67fc2f1af31327f4b 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,31 @@ 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("one_google_bar_service", R"(
+ semantics {
+ sender: "One Google Bar Service"
+ description: "Downloads the 'One Google' bar."
+ trigger:
+ "Displaying the new tab page on Desktop, if Google is the "
+ "configured search provider."
+ data: "Credentials if user has signed-in."
msramek 2017/05/22 16:51:16 nit: AFAIU "signed-in" (with the dash) is an adjec
Ramin Halavati 2017/05/23 04:54:57 Done.
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "Users can control this feature via selecting a non-Google default "
+ "search engine in Chrome settings under 'Search Engine'."
+ chrome_policy {
+ DefaultSearchProviderEnabled {
+ policy_options {mode: MANDATORY}
+ DefaultSearchProviderEnabled: false
+ }
+ }
+ })");
+ 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