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

Unified Diff: chrome/browser/search/suggestions/suggestions_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/search/suggestions/suggestions_service_factory.cc
diff --git a/chrome/browser/search/suggestions/suggestions_service_factory.cc b/chrome/browser/search/suggestions/suggestions_service_factory.cc
index 416cb60df84599345da583a73969bd510f76ebd7..de9323c024ae9ac6c1d15333e7a12c849c30ca0a 100644
--- a/chrome/browser/search/suggestions/suggestions_service_factory.cc
+++ b/chrome/browser/search/suggestions/suggestions_service_factory.cc
@@ -32,6 +32,7 @@
#include "components/suggestions/suggestions_store.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
using content::BrowserThread;
using image_fetcher::ImageFetcherImpl;
@@ -86,10 +87,30 @@ KeyedService* SuggestionsServiceFactory::BuildServiceInstanceFor(
base::FilePath database_dir(
profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails")));
+ net::NetworkTrafficAnnotationTag traffic_annotation =
Marc Treib 2017/05/09 09:43:47 image_manager_traffic_annotation (otherwise it's e
Ramin Halavati 2017/05/09 11:08:24 Done.
+ net::DefineNetworkTrafficAnnotation("...", R"(
Marc Treib 2017/05/09 09:43:46 suggestions_service
Ramin Halavati 2017/05/09 11:08:24 Done.
+ semantics {
+ sender: "..."
Marc Treib 2017/05/09 09:43:46 SuggestionsService
Ramin Halavati 2017/05/09 11:08:24 Done.
+ description: "..."
Marc Treib 2017/05/09 09:43:46 Retrieves thumbnails for site suggestions based on
Ramin Halavati 2017/05/09 11:08:24 Done.
+ trigger: "..."
Marc Treib 2017/05/09 09:43:46 Triggered when a thumbnail for a suggestion is req
Ramin Halavati 2017/05/09 11:08:24 Done.
+ data: "..."
Marc Treib 2017/05/09 09:43:46 None.
Ramin Halavati 2017/05/09 11:08:24 Shouldn't it sent links to required thumbnails? An
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
Marc Treib 2017/05/09 09:43:46 GOOGLE_OWNED_SERVICE
Ramin Halavati 2017/05/09 11:08:23 Done.
+ }
+ policy {
+ cookies_allowed: false/true
Marc Treib 2017/05/09 09:43:46 false
Ramin Halavati 2017/05/09 11:08:24 Done.
+ cookies_store: "..."
+ setting: "..."
Marc Treib 2017/05/09 09:43:46 This cannot be disabled individually, but users ca
Ramin Halavati 2017/05/09 11:08:24 Done.
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
+ })");
std::unique_ptr<ImageFetcherImpl> image_fetcher(
- new ImageFetcherImpl(
- base::MakeUnique<suggestions::ImageDecoderImpl>(),
- profile->GetRequestContext()));
+ new ImageFetcherImpl(base::MakeUnique<suggestions::ImageDecoderImpl>(),
+ profile->GetRequestContext(), traffic_annotation));
std::unique_ptr<ImageManager> thumbnail_manager(new ImageManager(
std::move(image_fetcher), std::move(db), database_dir,
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB)));

Powered by Google App Engine
This is Rietveld 408576698