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

Unified Diff: chrome/browser/safe_browsing/chrome_password_protection_service.h

Issue 2783773002: Link PasswordProtectionService to Profile and SB Service (Closed)
Patch Set: refine histogram description Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
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..0bc5e842ea179bdcd5f0875aa9ce5fae3b2cd493
--- /dev/null
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
@@ -0,0 +1,50 @@
+// 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"
+
+class Profile;
+
+namespace safe_browsing {
+
+class SafeBrowsingService;
+class SafeBrowsingNavigationObserverManager;
+
+// ChromePasswordProtectionService extends PasswordProtectionService by adding
+// access to SafeBrowsingNaivigationObserverManager and Profile.
+class ChromePasswordProtectionService : public PasswordProtectionService {
+ public:
+ ChromePasswordProtectionService(SafeBrowsingService* sb_service,
+ Profile* profile);
+ ~ChromePasswordProtectionService() override;
+
+ protected:
+ // 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 this instance.
+ 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_

Powered by Google App Engine
This is Rietveld 408576698