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

Unified Diff: chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc

Issue 2682263002: Network traffic annotation added to chrome::BitmapFetcher. (Closed)
Patch Set: Minor correction. 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
Index: chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
index 12d6b2f1c50ade6f3d7ab02dd611ca7995ebf8eb..6e92cac8697a1f0df02ad66eaddd3add0a492de2 100644
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -34,6 +34,7 @@
#include "components/sync/driver/sync_service_utils.h"
#include "content/public/browser/notification_service.h"
#include "extensions/features/features.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/autocomplete/keyword_extensions_delegate_impl.h"
@@ -248,7 +249,27 @@ void ChromeAutocompleteProviderClient::PrefetchImage(const GURL& url) {
BitmapFetcherService* image_service =
BitmapFetcherServiceFactory::GetForBrowserContext(profile_);
DCHECK(image_service);
- image_service->Prefetch(url);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("", R"(
+ semantics {
+ sender: ""
Justin Donnelly 2017/02/14 17:01:05 As pkasting points out, these should be identical
Ramin Halavati 2017/02/15 11:52:02 To keep the clang tool that extracts annotation si
Justin Donnelly 2017/02/15 21:39:44 That seems reasonable. But if we're going to intro
Peter Kasting 2017/02/16 00:05:21 If the tools can handle the following proposal, it
Ramin Halavati 2017/02/16 07:03:30 The Callback solution seems good. If you agree, I
+ description: ""
+ trigger: ""
+ data: ""
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
+ }
+ policy {
+ cookies_allowed: false/true
+ cookies_store: ""
+ setting: ""
+ policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ value: ...
+ }
+ }
+ })");
+ image_service->Prefetch(url, traffic_annotation);
}
void ChromeAutocompleteProviderClient::OnAutocompleteControllerResultReady(
« no previous file with comments | « no previous file | chrome/browser/bitmap_fetcher/bitmap_fetcher.h » ('j') | chrome/browser/extensions/webstore_install_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698