OLD | NEW |
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 Loading... |
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 |
OLD | NEW |