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

Unified Diff: components/doodle/doodle_service.cc

Issue 2794343002: Network traffic annotation added to image_data_fetcher. (Closed)
Patch Set: Android update. 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
« no previous file with comments | « chrome/browser/search/thumbnail_source.cc ('k') | components/doodle/doodle_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/doodle/doodle_service.cc
diff --git a/components/doodle/doodle_service.cc b/components/doodle/doodle_service.cc
index 8e61a0e4d43545d48708285950d600efa9525267..1e08502ffe5f27923c8c9d81f101b4da3dbf0e0c 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("...", R"(
Marc Treib 2017/05/19 08:29:11 doodle_service
Ramin Halavati 2017/05/19 08:35:18 Done.
+ semantics {
+ sender: "..."
Marc Treib 2017/05/19 08:29:12 Doodle service
Ramin Halavati 2017/05/19 08:35:18 Done.
+ description: "..."
Marc Treib 2017/05/19 08:29:12 Downloads the Doodle image if Google is your confi
Ramin Halavati 2017/05/19 08:35:18 Done.
+ trigger: "..."
Marc Treib 2017/05/19 08:29:12 Displaying the new tab page on Android.
Ramin Halavati 2017/05/19 08:35:18 Done.
+ data: "..."
Marc Treib 2017/05/19 08:29:12 None.
Ramin Halavati 2017/05/19 08:35:18 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER/LOCAL
Marc Treib 2017/05/19 08:29:12 GOOGLE_OWNED_SERVICE
Ramin Halavati 2017/05/19 08:35:18 Done.
+ }
+ policy {
+ cookies_allowed: false
+ setting: "..."
Marc Treib 2017/05/19 08:29:12 Choosing a non-Google search engine in Chromium se
Ramin Halavati 2017/05/19 08:35:18 Done.
+ chrome_policy {
+ [POLICY_NAME] {
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
+ [POLICY_NAME]: ... //(value to disable it)
+ }
+ }
+ policy_exception_justification: "..."
Marc Treib 2017/05/19 08:29:12 Not implemented, considered not useful as it does
Ramin Halavati 2017/05/19 08:35:18 Done.
+ })");
image_fetcher_->StartOrQueueNetworkRequest(
image_url.spec(), image_url,
base::Bind(&DoodleService::ImageFetched, base::Unretained(this),
- callback));
+ callback),
+ traffic_annotation);
}
void DoodleService::AddObserver(Observer* observer) {
« no previous file with comments | « chrome/browser/search/thumbnail_source.cc ('k') | components/doodle/doodle_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698