Chromium Code Reviews| 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 | |