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

Unified Diff: chrome/browser/extensions/api/dial/device_description_fetcher.cc

Issue 2738243003: Network traffic annotation added to device_description_fetcher. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/dial/device_description_fetcher.cc
diff --git a/chrome/browser/extensions/api/dial/device_description_fetcher.cc b/chrome/browser/extensions/api/dial/device_description_fetcher.cc
index 7be4b199367e06b3110989a1a54d1c6b8467991a..dfbfc770faf6ca3dee31a0d2e591672060834c8f 100644
--- a/chrome/browser/extensions/api/dial/device_description_fetcher.cc
+++ b/chrome/browser/extensions/api/dial/device_description_fetcher.cc
@@ -13,6 +13,7 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "net/http/http_util.h"
+#include "net/traffic_annotation/network_traffic_annotation.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_context_getter.h"
@@ -49,10 +50,31 @@ void DeviceDescriptionFetcher::Start() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!fetcher_);
+ net::NetworkTrafficAnnotationTag traffic_annotation =
+ net::DefineNetworkTrafficAnnotation("...", R"(
imcheng 2017/03/13 19:59:42 dial_get_device_description
Ramin Halavati 2017/03/13 21:44:30 Done.
+ semantics {
+ sender: "..."
imcheng 2017/03/13 19:59:42 dial
Ramin Halavati 2017/03/13 21:44:30 Done.
+ description: "..."
imcheng 2017/03/13 19:59:42 Chromium sends a request to a device (such as a sm
Ramin Halavati 2017/03/13 21:44:30 Done.
+ trigger: "..."
imcheng 2017/03/13 19:59:42 A new or updated device has been discovered via DI
Ramin Halavati 2017/03/13 21:44:30 Done.
+ data: "..."
imcheng 2017/03/13 19:59:42 A HTTP GET request.
Ramin Halavati 2017/03/13 21:44:30 Done.
+ destination: WEBSITE/GOOGLE_OWNED_SERVICE/OTHER
imcheng 2017/03/13 19:59:42 I suppose this should be WEBSITE as the destinatio
Ramin Halavati 2017/03/13 21:44:30 I think it's OTHER, as it is not a website that us
+ }
+ policy {
+ cookies_allowed: false/true
imcheng 2017/03/13 19:59:42 false
Ramin Halavati 2017/03/13 21:44:30 Done.
+ cookies_store: "..."
+ setting: "..."
imcheng 2017/03/13 19:59:42 This (and the Media Router) can be disabled via th
Ramin Halavati 2017/03/13 21:44:30 So it cannot be disabled by settings?
imcheng 2017/03/14 22:48:19 You can disable it via the media-router flag but n
Ramin Halavati 2017/03/15 06:37:37 Thank you.
+ chrome_policy {
+ [POLICY_NAME] {
imcheng 2017/03/13 19:59:42 EnableMediaRouter
Ramin Halavati 2017/03/13 21:44:30 Done.
+ policy_options {mode: MANDATORY/RECOMMENDED/UNSET}
imcheng 2017/03/13 19:59:42 MANDATORY
Ramin Halavati 2017/03/13 21:44:30 Done.
+ [POLICY_NAME]: ... //(value to disable it)
imcheng 2017/03/13 19:59:42 false
Ramin Halavati 2017/03/13 21:44:30 Done.
+ }
+ }
+ policy_exception_justification: "..."
+ })");
// DIAL returns device descriptions via GET request.
fetcher_ =
net::URLFetcher::Create(kURLFetcherIDForTest, device_description_url_,
- net::URLFetcher::GET, this);
+ net::URLFetcher::GET, this, traffic_annotation);
// net::LOAD_BYPASS_PROXY: Proxies almost certainly hurt more cases than they
// help.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698