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

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: revert io_thread, devtools_network_transaction_factory and move ServiceWorkerContext to service_worker_context_wrapper 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 #include <vector>
10 11
11 #include "base/basictypes.h" 12 #include "base/basictypes.h"
12 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
13 #include "base/metrics/field_trial.h" 14 #include "base/metrics/field_trial.h"
14 #include "base/synchronization/lock.h" 15 #include "base/synchronization/lock.h"
15 #include "components/variations/variations_associated_data.h" 16 #include "components/variations/variations_associated_data.h"
16 17
17 namespace content { 18 namespace content {
18 class ResourceContext; 19 class ResourceContext;
19 } 20 }
(...skipping 24 matching lines...) Expand all
44 bool uma_enabled, 45 bool uma_enabled,
45 net::HttpRequestHeaders* headers); 46 net::HttpRequestHeaders* headers);
46 47
47 // Sets *additional* variation ids and trigger variation ids to be encoded in 48 // 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 49 // 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 50 // force a server side experiment id. |variation_ids| should be a
50 // comma-separated string of numeric experiment ids. If an id is prefixed 51 // comma-separated string of numeric experiment ids. If an id is prefixed
51 // with "t" it will be treated as a trigger experiment id. 52 // with "t" it will be treated as a trigger experiment id.
52 bool SetDefaultVariationIds(const std::string& variation_ids); 53 bool SetDefaultVariationIds(const std::string& variation_ids);
53 54
55 // Returns the HTTP header names which are added in this class.
56 std::vector<std::string> GetVariationHeaderNames() const;
57
54 private: 58 private:
55 friend struct DefaultSingletonTraits<VariationsHttpHeaderProvider>; 59 friend struct DefaultSingletonTraits<VariationsHttpHeaderProvider>;
56 60
57 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
58 ShouldAppendHeaders); 62 ShouldAppendHeaders);
59 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
60 SetDefaultVariationIds_Valid); 64 SetDefaultVariationIds_Valid);
61 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 65 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest,
62 SetDefaultVariationIds_Invalid); 66 SetDefaultVariationIds_Invalid);
63 FRIEND_TEST_ALL_PREFIXES(VariationsHttpHeaderProviderTest, 67 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_; 107 std::set<VariationID> default_trigger_id_set_;
104 108
105 std::string variation_ids_header_; 109 std::string variation_ids_header_;
106 110
107 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider); 111 DISALLOW_COPY_AND_ASSIGN(VariationsHttpHeaderProvider);
108 }; 112 };
109 113
110 } // namespace variations 114 } // namespace variations
111 115
112 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_ 116 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADER_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698