Chromium Code Reviews| Index: chrome/browser/safe_browsing/chrome_password_protection_service.h |
| diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b/chrome/browser/safe_browsing/chrome_password_protection_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..60184141375f9dcb0624fe5cd51b3664415578fb |
| --- /dev/null |
| +++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h |
| @@ -0,0 +1,53 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |
| +#define CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |
| + |
| +#include "components/safe_browsing/password_protection/password_protection_service.h" |
| + |
| +#include "base/feature_list.h" |
|
Nathan Parker
2017/03/30 21:38:12
I think this can be moved to the .cc file
Jialiu Lin
2017/03/30 23:23:04
indeed. Done.
|
| + |
| +class Profile; |
| + |
| +namespace safe_browsing { |
| + |
| +class SafeBrowsingService; |
| +class SafeBrowsingNavigationObserverManager; |
| + |
| +// ChromePasswordProtectionService extends PasswordProtectionService by adding |
| +// access to SafeBrowsingNaivigationObserverManager and Profile. |
| +class ChromePasswordProtectionService : public PasswordProtectionService { |
| + public: |
| + static const base::Feature kPasswordProtectionPingOnly; |
| + |
| + ChromePasswordProtectionService(SafeBrowsingService* sb_service, |
| + Profile* profile); |
| + ~ChromePasswordProtectionService() override; |
| + |
| + // PasswordProtectionService overrides. |
| + // Obtains referrer chain of |event_url| and |event_tab_id| and add this |
| + // info into |frame|. |
| + void FillReferrerChain(const GURL& event_url, |
| + int event_tab_id, |
| + LoginReputationClientRequest::Frame* frame) override; |
| + |
| + bool IsExtendedReporting() override; |
| + |
| + bool IsIncognito() override; |
| + |
| + // Checks if Finch config allows sending pings to Safe Browsing backend. |
| + bool IsPingingEnabled() override; |
| + |
| + private: |
| + // Profile associated with instance. |
|
Nathan Parker
2017/03/30 21:38:12
Profile expected to outlive this class, yes?
Jialiu Lin
2017/03/30 23:23:04
Yes. Its creation is triggered by profile creation
|
| + Profile* profile_; |
| + scoped_refptr<SafeBrowsingNavigationObserverManager> |
| + navigation_observer_manager_; |
| + DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService); |
| +}; |
| + |
| +} // namespace safe_browsing |
| + |
| +#endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_PASSWORD_PROTECTION_SERVICE_H_ |