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

Unified Diff: components/ntp_tiles/popular_sites_impl.cc

Issue 2710713002: Network traffic annotation added to popular_sites_impl. (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/ntp_tiles/popular_sites_impl.cc
diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/popular_sites_impl.cc
index 566202b07d88c8cc228312ce4c98dbf0a5776b03..688f6349a957902e1a2b37ac7c1e42c75e95071e 100644
--- a/components/ntp_tiles/popular_sites_impl.cc
+++ b/components/ntp_tiles/popular_sites_impl.cc
@@ -31,6 +31,7 @@
#include "components/variations/variations_associated_data.h"
#include "net/base/load_flags.h"
#include "net/http/http_status_code.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#if defined(OS_ANDROID) || defined(OS_IOS)
#include "base/json/json_reader.h"
@@ -306,7 +307,29 @@ void PopularSitesImpl::RegisterProfilePrefs(
}
void PopularSitesImpl::FetchPopularSites() {
- fetcher_ = URLFetcher::Create(pending_url_, URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
Marc Treib 2017/02/22 09:49:37 popular_sites or popular_sites_fetch?
sfiera 2017/02/22 10:06:12 Should we prefix "popular sites" with "new tab pag
Ramin Halavati 2017/02/22 10:35:08 The first identifier is mostly a unique (meaningfu
+ semantics {
+ sender: "..."
Marc Treib 2017/02/22 09:49:37 popular sites
Ramin Halavati 2017/02/22 10:35:08 Done.
+ description: "..."
Marc Treib 2017/02/22 09:49:37 Google Chrome may display a list of regionally-pop
sfiera 2017/02/22 10:06:12 Do we not disable it for enterprise users, as we d
Marc Treib 2017/02/22 12:16:37 No, I don't think so. Shouldn't be too hard to set
+ trigger: "..."
Marc Treib 2017/02/22 09:49:37 Triggered automatically once per day, unless no po
Ramin Halavati 2017/02/22 10:35:08 Done.
+ data: "..."
Marc Treib 2017/02/22 09:49:37 A two-letter country code based on the user's loca
Ramin Halavati 2017/02/22 10:35:08 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
Marc Treib 2017/02/22 09:49:37 GOOGLE_OWNED_SERVICE
Ramin Halavati 2017/02/22 10:35:08 Done.
+ }
+ policy {
+ cookies_allowed: false/true
Marc Treib 2017/02/22 09:49:36 false
Ramin Halavati 2017/02/22 10:35:09 Done.
+ cookies_store: "..."
Marc Treib 2017/02/22 09:49:37 n/a
Ramin Halavati 2017/02/22 10:35:09 Done.
+ setting: "..."
Marc Treib 2017/02/22 09:49:36 NA
Ramin Halavati 2017/02/22 10:35:09 Done.
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ policy_exception_justification: "..."
Marc Treib 2017/02/22 09:49:37 Not sure - since we don't send any PII, I think a
Ramin Halavati 2017/02/22 10:35:08 But as you are sending user's country, it might ca
+ })");
+ fetcher_ = URLFetcher::Create(pending_url_, URLFetcher::GET, this,
+ traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
sfiera 2017/02/22 10:06:12 Will this new feature eventually supersede data_us
Ramin Halavati 2017/02/22 10:35:09 I don't think so. battre@: Any comments?
Marc Treib 2017/02/22 12:16:37 I wondered the same thing: We now have two things
fetcher_.get(), data_use_measurement::DataUseUserData::NTP_TILES);
fetcher_->SetRequestContext(download_context_);
« 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