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

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

Issue 49253005: Fetch extension blacklist states from SafeBrowsing server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 #include "chrome/browser/extensions/fake_safe_browsing_database_manager.h" 5 #include "chrome/browser/extensions/fake_safe_browsing_database_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 return *this; 51 return *this;
52 } 52 }
53 53
54 FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::SetUnsafe( 54 FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::SetUnsafe(
55 const std::string& a, const std::string& b, const std::string& c) { 55 const std::string& a, const std::string& b, const std::string& c) {
56 SetUnsafe(a, b); 56 SetUnsafe(a, b);
57 unsafe_ids_.insert(c); 57 unsafe_ids_.insert(c);
58 return *this; 58 return *this;
59 } 59 }
60 60
61 FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::SetUnsafe(
62 const std::string& a, const std::string& b, const std::string& c,
63 const std::string& d) {
64 SetUnsafe(a, b, c);
65 unsafe_ids_.insert(d);
66 return *this;
67 }
68
61 void FakeSafeBrowsingDatabaseManager::NotifyUpdate() { 69 void FakeSafeBrowsingDatabaseManager::NotifyUpdate() {
62 SafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished(true); 70 SafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished(true);
63 } 71 }
64 72
65 bool FakeSafeBrowsingDatabaseManager::CheckExtensionIDs( 73 bool FakeSafeBrowsingDatabaseManager::CheckExtensionIDs(
66 const std::set<std::string>& extension_ids, 74 const std::set<std::string>& extension_ids,
67 Client* client) { 75 Client* client) {
68 if (!enabled_) 76 if (!enabled_)
69 return true; 77 return true;
70 78
(...skipping 29 matching lines...) Expand all
100 return false; 108 return false;
101 } 109 }
102 110
103 void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult( 111 void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult(
104 scoped_ptr<SafeBrowsingCheck> result, 112 scoped_ptr<SafeBrowsingCheck> result,
105 Client* client) { 113 Client* client) {
106 client->OnSafeBrowsingResult(*result); 114 client->OnSafeBrowsingResult(*result);
107 } 115 }
108 116
109 } // namespace extensions 117 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/fake_safe_browsing_database_manager.h ('k') | chrome/browser/extensions/test_blacklist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698