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

Unified Diff: components/doodle/doodle_service.cc

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: Annotation updated. 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/doodle/doodle_service.cc
diff --git a/components/doodle/doodle_service.cc b/components/doodle/doodle_service.cc
index 8e61a0e4d43545d48708285950d600efa9525267..2f2246c1f5d9489f8e4fcac1798cd4a114dd7cbc 100644
--- a/components/doodle/doodle_service.cc
+++ b/components/doodle/doodle_service.cc
@@ -17,6 +17,7 @@
#include "components/prefs/pref_registry.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "ui/gfx/image/image.h"
namespace doodle {
@@ -106,10 +107,31 @@ void DoodleService::GetImage(const ImageCallback& callback) {
bool has_cta = cached_config_->large_cta_image.has_value();
const GURL& image_url = has_cta ? cached_config_->large_cta_image->url
: cached_config_->large_image.url;
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("doodle_service", R"(
+ semantics {
+ sender: "Doodle Service"
+ description:
+ "Downloads the Doodle image if Google is the configured search "
+ "provider."
+ trigger: "Displaying the new tab page on Android."
+ data: "None."
+ destination: GOOGLE_OWNED_SERVICE
+ }
+ policy {
+ cookies_allowed: false
+ setting:
+ "Choosing a non-Google search engine in Chromium settings under "
+ "'Search Engine' disables this feature."
+ policy_exception_justification:
+ "Not implemented, considered not useful as it does not upload any "
msramek 2017/05/19 08:47:38 Wouldn't this be https://www.chromium.org/administ
Ramin Halavati 2017/05/19 09:03:37 Sorry, missed again.
Marc Treib 2017/05/19 09:19:24 Yep, sounds like this policy would do the trick (i
+ "data and just downloads a logo image."
+ })");
image_fetcher_->StartOrQueueNetworkRequest(
image_url.spec(), image_url,
base::Bind(&DoodleService::ImageFetched, base::Unretained(this),
- callback));
+ callback),
+ traffic_annotation);
}
void DoodleService::AddObserver(Observer* observer) {

Powered by Google App Engine
This is Rietveld 408576698