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

Unified Diff: components/search_provider_logos/logo_tracker.cc

Issue 2718443002: Network traffic annotation added to logo_tracker. (Closed)
Patch Set: Created 3 years, 10 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: components/search_provider_logos/logo_tracker.cc
diff --git a/components/search_provider_logos/logo_tracker.cc b/components/search_provider_logos/logo_tracker.cc
index d5e10a61eb8fd4e8cb6a6de796f4fbf58123c807..738cee7dd2700ae796ee1de4b73ac9d6478f6b4b 100644
--- a/components/search_provider_logos/logo_tracker.cc
+++ b/components/search_provider_logos/logo_tracker.cc
@@ -17,6 +17,7 @@
#include "components/search_provider_logos/switches.h"
#include "net/http/http_response_headers.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_request_context_getter.h"
#include "net/url_request/url_request_status.h"
@@ -226,7 +227,29 @@ void LogoTracker::FetchLogo() {
logo_url_, fingerprint, wants_cta_, transparent_);
}
- fetcher_ = net::URLFetcher::Create(url, net::URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
justincohen 2017/02/23 15:14:29 logo_tracker
Ramin Halavati 2017/02/24 10:37:15 Done.
+ description: "..."
justincohen 2017/02/23 15:14:30 Provides the logo image for a search provider (e.g
Ramin Halavati 2017/02/24 10:37:15 Done.
+ trigger: "..."
justincohen 2017/02/23 15:14:30 Displaying the new tab page on iOS or Android.
Ramin Halavati 2017/02/24 10:37:15 Done.
+ data: "..."
justincohen 2017/02/23 15:14:30 Not sure here?
Ramin Halavati 2017/02/24 10:37:15 Isn't it the link to the logo image?
Marc Treib 2017/02/24 17:05:51 It can also contain the logo image data itself, an
justincohen 2017/02/24 20:29:41 This still needs to be updated? treib@ is correct
Ramin Halavati 2017/02/27 09:43:11 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
justincohen 2017/02/23 15:14:30 +treib@ The destination is set by SetServerAPI.
Marc Treib 2017/02/23 15:27:43 I think it's more in line with the intention of th
Ramin Halavati 2017/02/24 10:37:15 Done.
+ }
+ policy {
+ cookies_allowed: false/true
justincohen 2017/02/23 15:14:30 Not sure here, I think yes?
Ramin Halavati 2017/02/24 10:37:15 Yes, it's enabled by default, but if you don't nee
Marc Treib 2017/02/24 17:05:51 I *think* cookies aren't required here, but it's p
Ramin Halavati 2017/02/27 09:43:11 Done.
+ cookies_store: "..."
+ setting: "..."
justincohen 2017/02/23 15:14:29 You can't really disable this, not sure what goes
Marc Treib 2017/02/23 15:27:43 Well, choosing a non-Google default search engine
justincohen 2017/02/23 15:29:56 That's correct -- although the logo tracker doesn'
Ramin Halavati 2017/02/24 10:37:15 Please verify the update.
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ policy_exception_justification: "..."
+ })");
+ fetcher_ = net::URLFetcher::Create(url, net::URLFetcher::GET, this,
+ traffic_annotation);
fetcher_->SetRequestContext(request_context_getter_.get());
data_use_measurement::DataUseUserData::AttachToFetcher(
fetcher_.get(),
« 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