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

Side by Side Diff: chrome/browser/extensions/fake_safe_browsing_database_manager.h

Issue 1420053005: Move code in components/safe_browsing_db and chrome/browser/s_b/ under the safe_browsing namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_components_move
Patch Set: Remove '// namespace safe_browsing' for a small fwd decl block. Created 5 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/safe_browsing/local_database_manager.h" 11 #include "chrome/browser/safe_browsing/local_database_manager.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 // A fake safe browsing database manager for use with extensions tests. 15 // A fake safe browsing database manager for use with extensions tests.
16 // 16 //
17 // By default it is disabled (returning true and ignoring |unsafe_ids_|); 17 // By default it is disabled (returning true and ignoring |unsafe_ids_|);
18 // call set_enabled to enable it. 18 // call set_enabled to enable it.
19 class FakeSafeBrowsingDatabaseManager 19 class FakeSafeBrowsingDatabaseManager
20 : public LocalSafeBrowsingDatabaseManager { 20 : public safe_browsing::LocalSafeBrowsingDatabaseManager {
21 public: 21 public:
22 explicit FakeSafeBrowsingDatabaseManager(bool enabled); 22 explicit FakeSafeBrowsingDatabaseManager(bool enabled);
23 23
24 // Returns true if synchronously safe, false if not in which case the unsafe 24 // Returns true if synchronously safe, false if not in which case the unsafe
25 // IDs taken from |unsafe_ids_| are passed to to |client| on the current 25 // IDs taken from |unsafe_ids_| are passed to to |client| on the current
26 // message loop. 26 // message loop.
27 bool CheckExtensionIDs(const std::set<std::string>& extension_ids, 27 bool CheckExtensionIDs(const std::set<std::string>& extension_ids,
28 Client* client) override; 28 Client* client) override;
29 29
30 // Return |this| to chain together SetUnsafe(...).NotifyUpdate() conveniently. 30 // Return |this| to chain together SetUnsafe(...).NotifyUpdate() conveniently.
(...skipping 26 matching lines...) Expand all
57 // that there is definitely no extension ID match). 57 // that there is definitely no extension ID match).
58 bool enabled_; 58 bool enabled_;
59 59
60 // The extension IDs considered unsafe. 60 // The extension IDs considered unsafe.
61 std::set<std::string> unsafe_ids_; 61 std::set<std::string> unsafe_ids_;
62 }; 62 };
63 63
64 } // namespace extensions 64 } // namespace extensions
65 65
66 #endif // CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ 66 #endif // CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/blacklist_state_fetcher.cc ('k') | chrome/browser/extensions/fake_safe_browsing_database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698