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

Side by Side Diff: components/safe_browsing_db/v4_local_database_manager.h

Issue 2450413002: Small: Implement CheckResourceUrl (Closed)
Patch Set: git rebase Created 4 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
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_local_database_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DB_V4_LOCAL_DATABASE_MANAGER_H_ 5 #ifndef COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_
6 #define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ 6 #define COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_
7 7
8 // A class that provides the interface between the SafeBrowsing protocol manager 8 // A class that provides the interface between the SafeBrowsing protocol manager
9 // and database that holds the downloaded updates. 9 // and database that holds the downloaded updates.
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 enum class ClientCallbackType { 81 enum class ClientCallbackType {
82 // This represents the case when we're trying to determine if a URL is 82 // This represents the case when we're trying to determine if a URL is
83 // unsafe from the following perspectives: Malware, Phishing, UwS. 83 // unsafe from the following perspectives: Malware, Phishing, UwS.
84 CHECK_BROWSE_URL = 0, 84 CHECK_BROWSE_URL = 0,
85 85
86 // This represents the case when we're trying to determine if any of the 86 // This represents the case when we're trying to determine if any of the
87 // URLs in a vector of URLs is unsafe for downloading binaries. 87 // URLs in a vector of URLs is unsafe for downloading binaries.
88 CHECK_DOWNLOAD_URLS = 1, 88 CHECK_DOWNLOAD_URLS = 1,
89
90 // This represents the case when we're trying to determine if a URL is an
91 // unsafe resource.
92 CHECK_RESOURCE_URL = 2,
89 }; 93 };
90 94
91 // The information we need to process a URL safety reputation request and 95 // The information we need to process a URL safety reputation request and
92 // respond to the SafeBrowsing client that asked for it. 96 // respond to the SafeBrowsing client that asked for it.
93 // TODO(vakh): In its current form, it only includes information for 97 // TODO(vakh): In its current form, it only includes information for
94 // |CheckBrowseUrl| and |CheckDownloadUrl| methods. Extend it to serve other 98 // |CheckBrowseUrl| and |CheckDownloadUrl| methods. Extend it to serve other
95 // methods on |client|. 99 // methods on |client|.
96 struct PendingCheck { 100 struct PendingCheck {
97 PendingCheck(Client* client, 101 PendingCheck(Client* client,
98 ClientCallbackType client_callback_type, 102 ClientCallbackType client_callback_type,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 255
252 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_; 256 base::WeakPtrFactory<V4LocalDatabaseManager> weak_factory_;
253 257
254 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>; 258 friend class base::RefCountedThreadSafe<V4LocalDatabaseManager>;
255 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager); 259 DISALLOW_COPY_AND_ASSIGN(V4LocalDatabaseManager);
256 }; // class V4LocalDatabaseManager 260 }; // class V4LocalDatabaseManager
257 261
258 } // namespace safe_browsing 262 } // namespace safe_browsing
259 263
260 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_ 264 #endif // COMPONENTS_SAFE_BROWSING_DB_V4_LOCAL_DATABASE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_local_database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698