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

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

Issue 1530133005: Refactor VariationsHttpHeaderProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include to srt_fetcher_win.cc. Created 5 years 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADERS_H_
6 #define COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADERS_H_
7
8 #include <set>
9 #include <string>
10
11 namespace net {
12 class HttpRequestHeaders;
13 }
14
15 class GURL;
16
17 namespace variations {
18
19 // Adds Chrome experiment and metrics state as custom headers to |headers|.
20 // Some headers may not be set given the |incognito| mode or whether
21 // the user has |uma_enabled|. Also, we never transmit headers to non-Google
22 // sites, which is checked based on the destination |url|.
23 void AppendVariationHeaders(const GURL& url,
24 bool incognito,
25 bool uma_enabled,
26 net::HttpRequestHeaders* headers);
27
28 // Returns the HTTP header names which are added by AppendVariationHeaders().
29 std::set<std::string> GetVariationHeaderNames();
30
31 namespace internal {
32
33 // Checks whether variation headers should be appended to requests to the
34 // specified |url|. Returns true for google.<TLD> and youtube.<TLD> URLs.
35 bool ShouldAppendVariationHeaders(const GURL& url);
36
37 } // namespace internal
38
39 } // namespace variations
40
41 #endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_HTTP_HEADERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698