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

Side by Side Diff: components/feedback/feedback_uploader_chrome.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/feedback/feedback_uploader_chrome.h" 5 #include "components/feedback/feedback_uploader_chrome.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 post_url, net::URLFetcher::POST, 53 post_url, net::URLFetcher::POST,
54 new FeedbackUploaderDelegate( 54 new FeedbackUploaderDelegate(
55 data, base::Bind(&FeedbackUploaderChrome::UpdateUploadTimer, 55 data, base::Bind(&FeedbackUploaderChrome::UpdateUploadTimer,
56 AsWeakPtr()), 56 AsWeakPtr()),
57 base::Bind(&FeedbackUploaderChrome::RetryReport, AsWeakPtr()))) 57 base::Bind(&FeedbackUploaderChrome::RetryReport, AsWeakPtr())))
58 .release(); 58 .release();
59 data_use_measurement::DataUseUserData::AttachToFetcher( 59 data_use_measurement::DataUseUserData::AttachToFetcher(
60 fetcher, data_use_measurement::DataUseUserData::FEEDBACK_UPLOADER); 60 fetcher, data_use_measurement::DataUseUserData::FEEDBACK_UPLOADER);
61 // Tell feedback server about the variation state of this install. 61 // Tell feedback server about the variation state of this install.
62 net::HttpRequestHeaders headers; 62 net::HttpRequestHeaders headers;
63 variations::AppendVariationHeaders( 63 // Note: It's fine to pass in |is_signed_in| false, which does not affect
64 fetcher->GetOriginalURL(), context_->IsOffTheRecord(), false, &headers); 64 // transmission of experiment ids coming from the variations server.
65 bool is_signed_in = false;
66 variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
67 context_->IsOffTheRecord(), false,
68 is_signed_in, &headers);
65 fetcher->SetExtraRequestHeaders(headers.ToString()); 69 fetcher->SetExtraRequestHeaders(headers.ToString());
66 70
67 fetcher->SetUploadData(kProtoBufMimeType, data); 71 fetcher->SetUploadData(kProtoBufMimeType, data);
68 fetcher->SetRequestContext( 72 fetcher->SetRequestContext(
69 content::BrowserContext::GetDefaultStoragePartition(context_)-> 73 content::BrowserContext::GetDefaultStoragePartition(context_)->
70 GetURLRequestContext()); 74 GetURLRequestContext());
71 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES | 75 fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
72 net::LOAD_DO_NOT_SEND_COOKIES); 76 net::LOAD_DO_NOT_SEND_COOKIES);
73 fetcher->Start(); 77 fetcher->Start();
74 } 78 }
75 79
76 } // namespace feedback 80 } // namespace feedback
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_download_manager.cc ('k') | components/ntp_snippets/remote/ntp_snippets_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698