Index: rlz/lib/financial_ping.cc |
diff --git a/rlz/lib/financial_ping.cc b/rlz/lib/financial_ping.cc |
index b9c200d5e9b6cb6c25b405e2547d9b790ac094f4..5498b49af80c500a46059fbb86e5e92a7a8f1d84 100644 |
--- a/rlz/lib/financial_ping.cc |
+++ b/rlz/lib/financial_ping.cc |
@@ -58,6 +58,7 @@ class InternetHandle { |
#include "base/run_loop.h" |
#include "base/time/time.h" |
#include "net/base/load_flags.h" |
+#include "net/traffic_annotation/network_traffic_annotation.h" |
#include "net/url_request/url_fetcher.h" |
#include "net/url_request/url_fetcher_delegate.h" |
#include "net/url_request/url_request_context.h" |
@@ -318,8 +319,32 @@ bool FinancialPing::PingServer(const char* request, std::string* response) { |
kFinancialServer, kFinancialPort, |
request); |
- std::unique_ptr<net::URLFetcher> fetcher = |
- net::URLFetcher::Create(GURL(url), net::URLFetcher::GET, &delegate); |
+ net::NetworkTrafficAnnotationTag traffic_annotation = |
+ net::DefineNetworkTrafficAnnotation("rlz_ping", R"( |
+ semantics { |
+ sender: "RLZ Ping" |
+ description: |
+ "Used for measuring effectiveness of a promotion. See Chromium " |
msramek
2017/03/07 10:24:49
nit: Not a native speaker, but shouldn't this be "
Ramin Halavati
2017/03/07 12:46:00
Done.
|
+ "privacy policy for complete details: https://www.google.com/chrome" |
msramek
2017/03/07 10:24:49
"See the Chrome Privacy Whitepaper"
Ramin Halavati
2017/03/07 12:46:00
Done.
|
+ "/browser/privacy/whitepaper.html#measurepromotions" |
+ trigger: |
+ "1/ At Chromium first run, " |
msramek
2017/03/07 10:24:49
Should we add "\n" so it looks good when strings a
Ramin Halavati
2017/03/07 12:46:00
Done.
|
+ "2/ When Chromium is re-activated by a new promotion, " |
+ "3/ Once a week thereafter as long as Chromium is used." |
+ data: |
+ "1/ Non-unique cohort tag of when Chromium was installed, " |
+ "2/ Unique machine id on desktop platforms, " |
+ "3/ Whether Google is the default omnibox search, " |
+ "4/ Whether google.com is the default home page." |
+ destination: GOOGLE_OWNED_SERVICE |
+ } |
+ policy { |
+ cookies_allowed: false |
+ setting: "This feature cannot be disabled in settings." |
+ policy_exception_justification: "Not implemented." |
+ })"); |
+ std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create( |
+ GURL(url), net::URLFetcher::GET, &delegate, traffic_annotation); |
fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | |
net::LOAD_DO_NOT_SEND_AUTH_DATA | |