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

Unified Diff: components/ntp_tiles/popular_sites_impl.cc

Issue 2710713002: Network traffic annotation added to popular_sites_impl. (Closed)
Patch Set: Comments addressed. 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..6e443ab3718b911648397fa206f4d6d16dbb50c8 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,28 @@ void PopularSitesImpl::RegisterProfilePrefs(
}
void PopularSitesImpl::FetchPopularSites() {
- fetcher_ = URLFetcher::Create(pending_url_, URLFetcher::GET, this);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("popular_sites_fetch", R"(
+ semantics {
+ sender: "Popular Sites New Tab Fetch"
+ description:
+ "Google Chrome may display a list of regionally-popular web sites "
+ "on the New Tab Page. This service fetches the list of these sites."
+ trigger:
+ "Once per day, unless no popular web sites are required because "
+ "the New Tab Page is filled with suggestions based on the user's "
+ "browsing history."
+ data: "A two letter country code based on the user's location."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be disabled in settings."
+ policy_exception_justification:
+ "Not implemented, considered not useful."
+ })");
+ fetcher_ = URLFetcher::Create(pending_url_, URLFetcher::GET, this,
+ traffic_annotation);
data_use_measurement::DataUseUserData::AttachToFetcher(
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