| 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 #ifndef COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ | 5 #ifndef COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ | 
| 6 #define COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ | 6 #define COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 55   virtual void LogPauseDelay(base::TimeDelta time); | 55   virtual void LogPauseDelay(base::TimeDelta time); | 
| 56 | 56 | 
| 57   // This is a no-op in the base class, but should be overridden to send threat | 57   // This is a no-op in the base class, but should be overridden to send threat | 
| 58   // details. Called on the IO thread by the ThreatDetails with the serialized | 58   // details. Called on the IO thread by the ThreatDetails with the serialized | 
| 59   // protocol buffer. | 59   // protocol buffer. | 
| 60   virtual void SendSerializedThreatDetails(const std::string& serialized); | 60   virtual void SendSerializedThreatDetails(const std::string& serialized); | 
| 61 | 61 | 
| 62   // This is a no-op in the base class, but should be overridden to report hits | 62   // This is a no-op in the base class, but should be overridden to report hits | 
| 63   // to the unsafe contents (malware, phishing, unsafe download URL) | 63   // to the unsafe contents (malware, phishing, unsafe download URL) | 
| 64   // to the server. Can only be called on UI thread. | 64   // to the server. Can only be called on UI thread. | 
| 65   virtual void MaybeReportSafeBrowsingHit( | 65   virtual void MaybeReportSafeBrowsingHit(const HitReport& hit_report); | 
| 66       const safe_browsing::HitReport& hit_report); |  | 
| 67 | 66 | 
| 68   // A convenience wrapper method for IsUrlWhitelistedOrPendingForWebContents. | 67   // A convenience wrapper method for IsUrlWhitelistedOrPendingForWebContents. | 
| 69   virtual bool IsWhitelisted(const UnsafeResource& resource); | 68   virtual bool IsWhitelisted(const UnsafeResource& resource); | 
| 70 | 69 | 
| 71   // Checks if we already displayed or are displaying an interstitial | 70   // Checks if we already displayed or are displaying an interstitial | 
| 72   // for the top-level site |url| in a given WebContents. If | 71   // for the top-level site |url| in a given WebContents. If | 
| 73   // |whitelist_only|, it returns true only if the user chose to ignore | 72   // |whitelist_only|, it returns true only if the user chose to ignore | 
| 74   // the interstitial. Otherwise, it returns true if an interstitial for | 73   // the interstitial. Otherwise, it returns true if an interstitial for | 
| 75   // |url| is already displaying *or* if the user has seen an | 74   // |url| is already displaying *or* if the user has seen an | 
| 76   // interstitial for |url| before in this WebContents and proceeded | 75   // interstitial for |url| before in this WebContents and proceeded | 
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 146 | 145 | 
| 147  private: | 146  private: | 
| 148   friend class base::RefCountedThreadSafe<BaseUIManager>; | 147   friend class base::RefCountedThreadSafe<BaseUIManager>; | 
| 149 | 148 | 
| 150   DISALLOW_COPY_AND_ASSIGN(BaseUIManager); | 149   DISALLOW_COPY_AND_ASSIGN(BaseUIManager); | 
| 151 }; | 150 }; | 
| 152 | 151 | 
| 153 }  // namespace safe_browsing | 152 }  // namespace safe_browsing | 
| 154 | 153 | 
| 155 #endif  // COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ | 154 #endif  // COMPONENTS_SAFE_BROWSING_BASE_UI_MANAGER_H_ | 
| OLD | NEW | 
|---|