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

Unified Diff: components/favicon/core/large_icon_service.cc

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: Comments addressed. Created 3 years, 7 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
Index: components/favicon/core/large_icon_service.cc
diff --git a/components/favicon/core/large_icon_service.cc b/components/favicon/core/large_icon_service.cc
index 8920f7c49631db6cefd1240e1bfe3ef6a50accaf..387f5a714ac5fd70fa3459c25609609ee6ccd1f5 100644
--- a/components/favicon/core/large_icon_service.cc
+++ b/components/favicon/core/large_icon_service.cc
@@ -364,10 +364,34 @@ void LargeIconService::
image_fetcher_->SetDataUseServiceName(
data_use_measurement::DataUseUserData::LARGE_ICON_SERVICE);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("favicon_component", R"(
+ semantics {
+ sender: "Favicon Component"
+ description:
+ "Sends a request to a Google server to retrieve the favicon bitmap "
+ "for a page URL."
+ trigger:
+ "A request can be sent if Chrome does not have a favicon for a "
+ "particular page. This is done in two scenarios:\n"
+ " 1- For articles suggestions on the new tab page (URLs are public "
+ " and provided by Google).\n"
+ " 2- For server-suggested most visited tiles on the new tab page "
+ " (User gets these URLs from Google, only if history sync is "
+ " enabled)."
+ data: "Page URL and desired icon size."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting: "This feature cannot be disabled by settings."
+ policy_exception_justification: "Not implemented."
+ })");
image_fetcher_->StartOrQueueNetworkRequest(
server_request_url.spec(), server_request_url,
base::Bind(&OnFetchIconFromGoogleServerComplete, favicon_service_,
- page_url, callback));
+ page_url, callback),
+ traffic_annotation);
}
base::CancelableTaskTracker::TaskId
« no previous file with comments | « components/doodle/doodle_service_unittest.cc ('k') | components/favicon/core/large_icon_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698