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

Side by Side Diff: chrome/browser/safe_browsing/ui_manager.h

Issue 1943993006: Create test fixture for SafeBrowsingService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // The Safe Browsing service is responsible for downloading anti-phishing and 5 // The Safe Browsing service is responsible for downloading anti-phishing and
6 // anti-malware tables and checking urls against them. 6 // anti-malware tables and checking urls against them.
7 7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Add and remove observers. These methods must be invoked on the UI thread. 151 // Add and remove observers. These methods must be invoked on the UI thread.
152 void AddObserver(Observer* observer); 152 void AddObserver(Observer* observer);
153 void RemoveObserver(Observer* remove); 153 void RemoveObserver(Observer* remove);
154 154
155 protected: 155 protected:
156 virtual ~SafeBrowsingUIManager(); 156 virtual ~SafeBrowsingUIManager();
157 157
158 private: 158 private:
159 friend class base::RefCountedThreadSafe<SafeBrowsingUIManager>; 159 friend class base::RefCountedThreadSafe<SafeBrowsingUIManager>;
160 friend class SafeBrowsingUIManagerTest; 160 friend class SafeBrowsingUIManagerTest;
161 friend class TestSafeBrowsingUIManager;
161 162
162 // Call protocol manager on IO thread to report hits of unsafe contents. 163 // Call protocol manager on IO thread to report hits of unsafe contents.
163 void ReportSafeBrowsingHitOnIOThread( 164 void ReportSafeBrowsingHitOnIOThread(
164 const safe_browsing::HitReport& hit_report); 165 const safe_browsing::HitReport& hit_report);
165 166
166 // Sends an invalid certificate chain report over the network. 167 // Sends an invalid certificate chain report over the network.
167 void ReportInvalidCertificateChainOnIOThread( 168 void ReportInvalidCertificateChainOnIOThread(
168 const std::string& serialized_report); 169 const std::string& serialized_report);
169 170
170 // Updates the whitelist state. Called on the UI thread. 171 // Updates the whitelist state. Called on the UI thread.
171 void AddToWhitelist(const UnsafeResource& resource); 172 void AddToWhitelist(const UnsafeResource& resource);
172 173
173 // Safebrowsing service. 174 // Safebrowsing service.
174 scoped_refptr<SafeBrowsingService> sb_service_; 175 scoped_refptr<SafeBrowsingService> sb_service_;
175 176
176 base::ObserverList<Observer> observer_list_; 177 base::ObserverList<Observer> observer_list_;
177 178
178 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIManager); 179 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIManager);
179 }; 180 };
180 181
181 } // namespace safe_browsing 182 } // namespace safe_browsing
182 183
183 #endif // CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_ 184 #endif // CHROME_BROWSER_SAFE_BROWSING_UI_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698