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

Unified Diff: chrome/browser/favicon/large_icon_service_factory.cc

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: Annotation moved to callers. 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: chrome/browser/favicon/large_icon_service_factory.cc
diff --git a/chrome/browser/favicon/large_icon_service_factory.cc b/chrome/browser/favicon/large_icon_service_factory.cc
index b81c5c4ac949e3d0734726fa99bc566ea17686bd..c15023e1bbec7c8eaf3f3ce8f55edca93eb2aaa0 100644
--- a/chrome/browser/favicon/large_icon_service_factory.cc
+++ b/chrome/browser/favicon/large_icon_service_factory.cc
@@ -16,6 +16,7 @@
#include "components/image_fetcher/core/image_fetcher_impl.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "content/public/browser/browser_context.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
// static
favicon::LargeIconService* LargeIconServiceFactory::GetForBrowserContext(
@@ -49,6 +50,27 @@ KeyedService* LargeIconServiceFactory::BuildServiceInstanceFor(
favicon::FaviconService* favicon_service =
FaviconServiceFactory::GetForProfile(profile,
ServiceAccessType::EXPLICIT_ACCESS);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
+ semantics {
+ sender: "..."
+ description: "..."
+ trigger: "..."
+ data: "..."
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: "..."
+ setting: "..."
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
+ })");
return new favicon::LargeIconService(
favicon_service,
base::CreateTaskRunnerWithTraits(
@@ -56,7 +78,7 @@ KeyedService* LargeIconServiceFactory::BuildServiceInstanceFor(
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}),
base::MakeUnique<image_fetcher::ImageFetcherImpl>(
base::MakeUnique<suggestions::ImageDecoderImpl>(),
- profile->GetRequestContext()));
+ profile->GetRequestContext(), traffic_annotation));
}
bool LargeIconServiceFactory::ServiceIsNULLWhileTesting() const {

Powered by Google App Engine
This is Rietveld 408576698