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

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

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
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 // This file should not be build on Android but is currently getting built. 5 // This file should not be build on Android but is currently getting built.
6 // TODO(vakh): Fix that: http://crbug.com/621647 6 // TODO(vakh): Fix that: http://crbug.com/621647
7 7
8 #include "components/safe_browsing_db/v4_local_database_manager.h" 8 #include "components/safe_browsing_db/v4_local_database_manager.h"
9 9
10 #include <vector> 10 #include <vector>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 bool V4LocalDatabaseManager::CheckExtensionIDs( 170 bool V4LocalDatabaseManager::CheckExtensionIDs(
171 const std::set<std::string>& extension_ids, 171 const std::set<std::string>& extension_ids,
172 Client* client) { 172 Client* client) {
173 // TODO(vakh): Implement this skeleton. 173 // TODO(vakh): Implement this skeleton.
174 DCHECK_CURRENTLY_ON(BrowserThread::IO); 174 DCHECK_CURRENTLY_ON(BrowserThread::IO);
175 return true; 175 return true;
176 } 176 }
177 177
178 bool V4LocalDatabaseManager::CheckResourceUrl(const GURL& url, Client* client) { 178 bool V4LocalDatabaseManager::CheckResourceUrl(const GURL& url, Client* client) {
179 // TODO(vakh): Implement this skeleton.
180 DCHECK_CURRENTLY_ON(BrowserThread::IO); 179 DCHECK_CURRENTLY_ON(BrowserThread::IO);
181 return true; 180
181 if (!enabled_ || !CanCheckUrl(url)) {
182 return true;
183 }
184
185 std::unique_ptr<PendingCheck> check = base::MakeUnique<PendingCheck>(
186 client, ClientCallbackType::CHECK_RESOURCE_URL,
187 StoresToCheck({GetChromeUrlClientIncidentId()}),
188 std::vector<GURL>(1, url));
189
190 return HandleCheck(std::move(check));
182 } 191 }
183 192
184 bool V4LocalDatabaseManager::MatchCsdWhitelistUrl(const GURL& url) { 193 bool V4LocalDatabaseManager::MatchCsdWhitelistUrl(const GURL& url) {
185 // TODO(vakh): Implement this skeleton. 194 // TODO(vakh): Implement this skeleton.
186 DCHECK_CURRENTLY_ON(BrowserThread::IO); 195 DCHECK_CURRENTLY_ON(BrowserThread::IO);
187 return true; 196 return true;
188 } 197 }
189 198
190 bool V4LocalDatabaseManager::MatchDownloadWhitelistString( 199 bool V4LocalDatabaseManager::MatchDownloadWhitelistString(
191 const std::string& str) { 200 const std::string& str) {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 545 }
537 546
538 void V4LocalDatabaseManager::UpdateRequestCompleted( 547 void V4LocalDatabaseManager::UpdateRequestCompleted(
539 std::unique_ptr<ParsedServerResponse> parsed_server_response) { 548 std::unique_ptr<ParsedServerResponse> parsed_server_response) {
540 DCHECK_CURRENTLY_ON(BrowserThread::IO); 549 DCHECK_CURRENTLY_ON(BrowserThread::IO);
541 v4_database_->ApplyUpdate(std::move(parsed_server_response), 550 v4_database_->ApplyUpdate(std::move(parsed_server_response),
542 db_updated_callback_); 551 db_updated_callback_);
543 } 552 }
544 553
545 } // namespace safe_browsing 554 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_local_database_manager.h ('k') | components/safe_browsing_db/v4_protocol_manager_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698