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

Side by Side Diff: components/variations/net/variations_http_header_provider.h

Issue 666973003: [ServiceWorker] Don't send the UMA related headers to the ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: introduce VariationsHttpHeaderProvider::GetExcludedHeadersForFetchEvent Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 5 #ifndef COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_
6 #define COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 6 #define COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool uma_enabled, 44 bool uma_enabled,
45 net::HttpRequestHeaders* headers); 45 net::HttpRequestHeaders* headers);
46 46
47 // Sets *additional* variation ids and trigger variation ids to be encoded in 47 // Sets *additional* variation ids and trigger variation ids to be encoded in
48 // the X-Client-Data request header. This is intended for development use to 48 // the X-Client-Data request header. This is intended for development use to
49 // force a server side experiment id. |variation_ids| should be a 49 // force a server side experiment id. |variation_ids| should be a
50 // comma-separated string of numeric experiment ids. If an id is prefixed 50 // comma-separated string of numeric experiment ids. If an id is prefixed
51 // with "t" it will be treated as a trigger experiment id. 51 // with "t" it will be treated as a trigger experiment id.
52 bool SetDefaultVariationIds(const std::string& variation_ids); 52 bool SetDefaultVariationIds(const std::string& variation_ids);
53 53
54 std::vector<std::string> GetExcludedHeadersForFetchEvent() const;
Alexei Svitkine (slow) 2014/10/28 13:32:50 I wouldn't use the term "Excluded" here, since tha
horo 2014/10/28 15:35:47 Done.
55
54 private: 56 private:
55 friend struct DefaultSingletonTraits<VariationsHttpHeaderProvider>; 57 friend struct DefaultSingletonTraits<VariationsHttpHeaderProvider>;
56 58
57 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 59 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
58 ShouldAppendHeaders); 60 ShouldAppendHeaders);
59 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
60 SetDefaultVariationIds_Valid); 62 SetDefaultVariationIds_Valid);
61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
62 SetDefaultVariationIds_Invalid); 64 SetDefaultVariationIds_Invalid);
63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 65 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 std::set<VariationID> default_trigger_id_set_; 105 std::set<VariationID> default_trigger_id_set_;
104 106
105 std::string variation_ids_header_; 107 std::string variation_ids_header_;
106 108
107 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider); 109 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider);
108 }; 110 };
109 111
110 } // namespace variations 112 } // namespace variations
111 113
112 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 114 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698