Commit b2ea4c9c authored by asvitkine's avatar asvitkine Committed by Commit bot

Update some comments about variations headers API use.

Based on post-review comments on:
https://codereview.chromium.org/2558913003/

BUG=none
TBR=mattm@chromium.org,donnd@chromium.org,afakhry@chromium.org,noyau@chromium.org

Review-Url: https://codereview.chromium.org/2627033003
Cr-Commit-Position: refs/heads/master@{#443250}
parent 92651104
......@@ -136,8 +136,8 @@ void ContextualSearchDelegate::ContinueSearchTermResolutionRequest() {
// Add Chrome experiment state to the request headers.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(
search_term_fetcher_->GetOriginalURL(),
......
......@@ -632,8 +632,8 @@ class SRTFetcher : public net::URLFetcherDelegate {
ProfileIOData* io_data = ProfileIOData::FromResourceContext(
profile_->GetResourceContext());
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(
url_fetcher_->GetOriginalURL(), io_data->IsOffTheRecord(),
......
......@@ -247,8 +247,8 @@ bool AutofillDownloadManager::StartRequest(
net::LOAD_DO_NOT_SEND_COOKIES);
// Add Chrome experiment state to the request headers.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
driver_->IsOffTheRecord(), false,
......
......@@ -60,8 +60,8 @@ void FeedbackUploaderChrome::DispatchReport(const std::string& data) {
fetcher, data_use_measurement::DataUseUserData::FEEDBACK_UPLOADER);
// Tell feedback server about the variation state of this install.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
context_->IsOffTheRecord(), false,
......
......@@ -356,8 +356,8 @@ std::string NTPSnippetsJsonRequest::Builder::BuildHeaders() const {
headers.SetHeader("Authorization", auth_header_);
}
// Add X-Client-Data header with experiment IDs from field trials.
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(url_,
false, // incognito
......
......@@ -890,8 +890,8 @@ std::unique_ptr<net::URLFetcher> SearchProvider::CreateSuggestFetcher(
fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
// Add Chrome experiment state to the request headers.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
client()->IsOffTheRecord(), false,
......
......@@ -333,8 +333,8 @@ void ZeroSuggestProvider::Run(const GURL& suggest_url) {
fetcher_->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES);
// Add Chrome experiment state to the request headers.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(fetcher_->GetOriginalURL(),
client()->IsOffTheRecord(), false,
......
......@@ -423,8 +423,8 @@ SuggestionsServiceImpl::CreateSuggestionsRequest(
request->SetRequestContext(url_request_context_);
// Add Chrome experiment state to the request headers.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(request->GetOriginalURL(), false, false,
is_signed_in, &headers);
......
......@@ -173,8 +173,8 @@ void ContextualSearchDelegate::RequestServerSearchTerm() {
// Add Chrome experiment state to the request headers.
net::HttpRequestHeaders headers;
// Note: It's fine to pass in |is_signed_in| false, which does not affect
// transmission of experiment ids coming from the variations server.
// Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
// not affect transmission of experiments coming from the variations server.
bool is_signed_in = false;
variations::AppendVariationHeaders(search_term_fetcher_->GetOriginalURL(),
browser_state_->IsOffTheRecord(), false,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment