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..c8fcfecfffd46aa31575a5ee139ad7d744e06d30 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,38 @@ 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 user has signed into " |
+ "Chrome and Google is the configured search provider." |
sfiera
2017/05/22 13:24:13
My earlier comments were incorrect. The request is
Ramin Halavati
2017/05/22 13:28:15
Done.
|
+ data: "Credentials of signed-in user." |
+ 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', or " |
+ "signing out of Chrome." |
+ chrome_policy { |
+ SigninAllowed { |
+ policy_options {mode: MANDATORY} |
+ SigninAllowed: false |
+ } |
+ } |
+ 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 | |