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

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: use set 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 // Returns the HTTP header names which are added in this class.
55 std::set<std::string> GetVariationHeaderNames() const;
56
54 private: 57 private:
55 friend struct DefaultSingletonTraits<VariationsHttpHeaderProvider>; 58 friend struct DefaultSingletonTraits<VariationsHttpHeaderProvider>;
56 59
57 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 60 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
58 ShouldAppendHeaders); 61 ShouldAppendHeaders);
59 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 62 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
60 SetDefaultVariationIds_Valid); 63 SetDefaultVariationIds_Valid);
61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 64 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
62 SetDefaultVariationIds_Invalid); 65 SetDefaultVariationIds_Invalid);
63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 66 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_; 106 std::set<VariationID> default_trigger_id_set_;
104 107
105 std::string variation_ids_header_; 108 std::string variation_ids_header_;
106 109
107 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider); 110 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider);
108 }; 111 };
109 112
110 } // namespace variations 113 } // namespace variations
111 114
112 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 115 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698