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

Side by Side Diff: chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.cc

Issue 2869383002: Unify safe_browsing* components [1]: move safe_browsing_prefs* (Closed)
Patch Set: fix win bots Created 3 years, 7 months 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chrome_cleaner/srt_client_info_win.h" 5 #include "chrome/browser/safe_browsing/chrome_cleaner/srt_client_info_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
11 #include "chrome/common/channel_info.h" 11 #include "chrome/common/channel_info.h"
12 #include "components/safe_browsing_db/safe_browsing_prefs.h" 12 #include "components/safe_browsing/common/safe_browsing_prefs.h"
13 #include "components/version_info/version_info.h" 13 #include "components/version_info/version_info.h"
14 14
15 namespace safe_browsing { 15 namespace safe_browsing {
16 16
17 int ChannelAsInt() { 17 int ChannelAsInt() {
18 switch (chrome::GetChannel()) { 18 switch (chrome::GetChannel()) {
19 case version_info::Channel::UNKNOWN: 19 case version_info::Channel::UNKNOWN:
20 return 0; 20 return 0;
21 case version_info::Channel::CANARY: 21 case version_info::Channel::CANARY:
22 return 1; 22 return 1;
(...skipping 12 matching lines...) Expand all
35 // Check all profiles registered with the manager. 35 // Check all profiles registered with the manager.
36 std::vector<Profile*> profiles = 36 std::vector<Profile*> profiles =
37 g_browser_process->profile_manager()->GetLoadedProfiles(); 37 g_browser_process->profile_manager()->GetLoadedProfiles();
38 return std::any_of(profiles.begin(), profiles.end(), 38 return std::any_of(profiles.begin(), profiles.end(),
39 [](const Profile* profile) { 39 [](const Profile* profile) {
40 return IsExtendedReportingEnabled(*profile->GetPrefs()); 40 return IsExtendedReportingEnabled(*profile->GetPrefs());
41 }); 41 });
42 } 42 }
43 43
44 } // namespace safe_browsing 44 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698