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

Side by Side Diff: components/autofill/core/browser/autofill_download_manager.cc

Issue 2558913003: Restrict transmission of external exp ids to signed in users. (Closed)
Patch Set: Address nit. Created 4 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
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 #include "components/autofill/core/browser/autofill_download_manager.h" 5 #include "components/autofill/core/browser/autofill_download_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 fetcher, data_use_measurement::DataUseUserData::AUTOFILL); 240 fetcher, data_use_measurement::DataUseUserData::AUTOFILL);
241 url_fetchers_[fetcher] = 241 url_fetchers_[fetcher] =
242 std::make_pair(std::move(owned_fetcher), request_data); 242 std::make_pair(std::move(owned_fetcher), request_data);
243 fetcher->SetAutomaticallyRetryOn5xx(false); 243 fetcher->SetAutomaticallyRetryOn5xx(false);
244 fetcher->SetRequestContext(request_context); 244 fetcher->SetRequestContext(request_context);
245 fetcher->SetUploadData("text/proto", request_data.payload); 245 fetcher->SetUploadData("text/proto", request_data.payload);
246 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES | 246 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
247 net::LOAD_DO_NOT_SEND_COOKIES); 247 net::LOAD_DO_NOT_SEND_COOKIES);
248 // Add Chrome experiment state to the request headers. 248 // Add Chrome experiment state to the request headers.
249 net::HttpRequestHeaders headers; 249 net::HttpRequestHeaders headers;
250 variations::AppendVariationHeaders( 250 // Note: It's fine to pass in |is_signed_in| false, which does not affect
251 fetcher->GetOriginalURL(), driver_->IsOffTheRecord(), false, &headers); 251 // transmission of experiment ids coming from the variations server.
252 bool is_signed_in = false;
253 variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
254 driver_->IsOffTheRecord(), false,
255 is_signed_in, &headers);
252 fetcher->SetExtraRequestHeaders(headers.ToString()); 256 fetcher->SetExtraRequestHeaders(headers.ToString());
253 fetcher->Start(); 257 fetcher->Start();
254 258
255 return true; 259 return true;
256 } 260 }
257 261
258 void AutofillDownloadManager::CacheQueryRequest( 262 void AutofillDownloadManager::CacheQueryRequest(
259 const std::vector<std::string>& forms_in_query, 263 const std::vector<std::string>& forms_in_query,
260 const std::string& query_data) { 264 const std::string& query_data) {
261 std::string signature = GetCombinedSignature(forms_in_query); 265 std::string signature = GetCombinedSignature(forms_in_query);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 it->second.second.form_signatures); 350 it->second.second.form_signatures);
347 } else { 351 } else {
348 VLOG(1) << "AutofillDownloadManager: upload request has succeeded."; 352 VLOG(1) << "AutofillDownloadManager: upload request has succeeded.";
349 observer_->OnUploadedPossibleFieldTypes(); 353 observer_->OnUploadedPossibleFieldTypes();
350 } 354 }
351 } 355 }
352 url_fetchers_.erase(it); 356 url_fetchers_.erase(it);
353 } 357 }
354 358
355 } // namespace autofill 359 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/srt_fetcher_win.cc ('k') | components/feedback/feedback_uploader_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698