OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_password_protection_service.h" | 5 #include "chrome/browser/safe_browsing/chrome_password_protection_service.h" |
6 | 6 |
7 #include "base/feature_list.h" | 7 #include "base/feature_list.h" |
8 #include "base/metrics/field_trial_params.h" | 8 #include "base/metrics/field_trial_params.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
11 #include "chrome/browser/history/history_service_factory.h" | 11 #include "chrome/browser/history/history_service_factory.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager
.h" | 13 #include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager
.h" |
14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 14 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
15 #include "chrome/browser/sync/profile_sync_service_factory.h" | 15 #include "chrome/browser/sync/profile_sync_service_factory.h" |
16 #include "components/browser_sync/profile_sync_service.h" | 16 #include "components/browser_sync/profile_sync_service.h" |
| 17 #include "components/safe_browsing/common/safe_browsing_prefs.h" |
17 #include "components/safe_browsing/password_protection/password_protection_reque
st.h" | 18 #include "components/safe_browsing/password_protection/password_protection_reque
st.h" |
18 #include "components/safe_browsing_db/database_manager.h" | 19 #include "components/safe_browsing_db/database_manager.h" |
19 #include "components/safe_browsing_db/safe_browsing_prefs.h" | |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 | 22 |
23 namespace safe_browsing { | 23 namespace safe_browsing { |
24 | 24 |
25 namespace { | 25 namespace { |
26 // The number of user gestures we trace back for login event attribution. | 26 // The number of user gestures we trace back for login event attribution. |
27 const int kPasswordEventAttributionUserGestureLimit = 2; | 27 const int kPasswordEventAttributionUserGestureLimit = 2; |
28 } | 28 } |
29 | 29 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 bool ChromePasswordProtectionService::IsHistorySyncEnabled() { | 108 bool ChromePasswordProtectionService::IsHistorySyncEnabled() { |
109 browser_sync::ProfileSyncService* sync = | 109 browser_sync::ProfileSyncService* sync = |
110 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_); | 110 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_); |
111 return sync && sync->IsSyncActive() && !sync->IsLocalSyncEnabled() && | 111 return sync && sync->IsSyncActive() && !sync->IsLocalSyncEnabled() && |
112 sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); | 112 sync->GetActiveDataTypes().Has(syncer::HISTORY_DELETE_DIRECTIVES); |
113 } | 113 } |
114 | 114 |
115 ChromePasswordProtectionService::ChromePasswordProtectionService() | 115 ChromePasswordProtectionService::ChromePasswordProtectionService() |
116 : PasswordProtectionService(nullptr, nullptr, nullptr, nullptr) {} | 116 : PasswordProtectionService(nullptr, nullptr, nullptr, nullptr) {} |
117 } // namespace safe_browsing | 117 } // namespace safe_browsing |
OLD | NEW |