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

Side by Side Diff: chrome/browser/safe_browsing/srt_fetcher_win.cc

Issue 2558913003: Restrict transmission of external exp ids to signed in users. (Closed)
Patch Set: google_services_account_id is not initialized in incognito 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 2015 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/safe_browsing/srt_fetcher_win.h" 5 #include "chrome/browser/safe_browsing/srt_fetcher_win.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE)); 628 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE));
629 url_fetcher_->SetRequestContext( 629 url_fetcher_->SetRequestContext(
630 g_browser_process->system_request_context()); 630 g_browser_process->system_request_context());
631 // Adds the UMA bit to the download request if the user is enrolled in UMA. 631 // Adds the UMA bit to the download request if the user is enrolled in UMA.
632 ProfileIOData* io_data = ProfileIOData::FromResourceContext( 632 ProfileIOData* io_data = ProfileIOData::FromResourceContext(
633 profile_->GetResourceContext()); 633 profile_->GetResourceContext());
634 net::HttpRequestHeaders headers; 634 net::HttpRequestHeaders headers;
635 variations::AppendVariationHeaders( 635 variations::AppendVariationHeaders(
636 url_fetcher_->GetOriginalURL(), io_data->IsOffTheRecord(), 636 url_fetcher_->GetOriginalURL(), io_data->IsOffTheRecord(),
637 ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(), 637 ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(),
638 &headers); 638 false, &headers);
639 url_fetcher_->SetExtraRequestHeaders(headers.ToString()); 639 url_fetcher_->SetExtraRequestHeaders(headers.ToString());
640 url_fetcher_->Start(); 640 url_fetcher_->Start();
641 } 641 }
642 642
643 // net::URLFetcherDelegate: 643 // net::URLFetcherDelegate:
644 void OnURLFetchComplete(const net::URLFetcher* source) override { 644 void OnURLFetchComplete(const net::URLFetcher* source) override {
645 // Take ownership of the fetcher in this scope (source == url_fetcher_). 645 // Take ownership of the fetcher in this scope (source == url_fetcher_).
646 DCHECK_EQ(url_fetcher_.get(), source); 646 DCHECK_EQ(url_fetcher_.get(), source);
647 647
648 base::FilePath download_path; 648 base::FilePath download_path;
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(), 1093 return srt_cleaner_key.Open(HKEY_CURRENT_USER, cleaner_key_path.c_str(),
1094 KEY_QUERY_VALUE) == ERROR_SUCCESS && 1094 KEY_QUERY_VALUE) == ERROR_SUCCESS &&
1095 srt_cleaner_key.GetValueCount() > 0; 1095 srt_cleaner_key.GetValueCount() > 0;
1096 } 1096 }
1097 1097
1098 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) { 1098 void SetSwReporterTestingDelegate(SwReporterTestingDelegate* delegate) {
1099 g_testing_delegate_ = delegate; 1099 g_testing_delegate_ = delegate;
1100 } 1100 }
1101 1101
1102 } // namespace safe_browsing 1102 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698