Commit 3f0909cd authored by shess@chromium.org's avatar shess@chromium.org

[safe_browsing] Remove unused ContainsBrowseUrl() parameter.

BUG=none

Review URL: https://codereview.chromium.org/260233002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266896 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c543754
...@@ -358,12 +358,11 @@ bool SafeBrowsingDatabaseManager::CheckBrowseUrl(const GURL& url, ...@@ -358,12 +358,11 @@ bool SafeBrowsingDatabaseManager::CheckBrowseUrl(const GURL& url,
return false; return false;
} }
std::string list;
std::vector<SBPrefix> prefix_hits; std::vector<SBPrefix> prefix_hits;
std::vector<SBFullHashResult> full_hits; std::vector<SBFullHashResult> full_hits;
bool prefix_match = bool prefix_match =
database_->ContainsBrowseUrl(url, &list, &prefix_hits, &full_hits, database_->ContainsBrowseUrl(url, &prefix_hits, &full_hits,
sb_service_->protocol_manager()->last_update()); sb_service_->protocol_manager()->last_update());
UMA_HISTOGRAM_TIMES("SB2.FilterCheck", base::TimeTicks::Now() - start); UMA_HISTOGRAM_TIMES("SB2.FilterCheck", base::TimeTicks::Now() - start);
......
...@@ -661,15 +661,12 @@ bool SafeBrowsingDatabaseNew::ResetDatabase() { ...@@ -661,15 +661,12 @@ bool SafeBrowsingDatabaseNew::ResetDatabase() {
return true; return true;
} }
// TODO(lzheng): Remove matching_list, it is not used anywhere.
bool SafeBrowsingDatabaseNew::ContainsBrowseUrl( bool SafeBrowsingDatabaseNew::ContainsBrowseUrl(
const GURL& url, const GURL& url,
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits, std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits, std::vector<SBFullHashResult>* full_hits,
base::Time last_update) { base::Time last_update) {
// Clear the results first. // Clear the results first.
matching_list->clear();
prefix_hits->clear(); prefix_hits->clear();
full_hits->clear(); full_hits->clear();
......
...@@ -103,13 +103,10 @@ class SafeBrowsingDatabase { ...@@ -103,13 +103,10 @@ class SafeBrowsingDatabase {
// Deletes the current database and creates a new one. // Deletes the current database and creates a new one.
virtual bool ResetDatabase() = 0; virtual bool ResetDatabase() = 0;
// Returns false if |url| is not in the browse database. If it // Returns false if |url| is not in the browse database. If it returns true,
// returns true, then either |matching_list| is the name of the matching // then |prefix_hits| and |full_hits| contains the matching hash prefixes.
// list, or |prefix_hits| and |full_hits| contains the matching hash // This function is safe to call from threads other than the creation thread.
// prefixes. This function is safe to call from threads other than
// the creation thread.
virtual bool ContainsBrowseUrl(const GURL& url, virtual bool ContainsBrowseUrl(const GURL& url,
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits, std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits, std::vector<SBFullHashResult>* full_hits,
base::Time last_update) = 0; base::Time last_update) = 0;
...@@ -301,7 +298,6 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase { ...@@ -301,7 +298,6 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase {
virtual void Init(const base::FilePath& filename) OVERRIDE; virtual void Init(const base::FilePath& filename) OVERRIDE;
virtual bool ResetDatabase() OVERRIDE; virtual bool ResetDatabase() OVERRIDE;
virtual bool ContainsBrowseUrl(const GURL& url, virtual bool ContainsBrowseUrl(const GURL& url,
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits, std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits, std::vector<SBFullHashResult>* full_hits,
base::Time last_update) OVERRIDE; base::Time last_update) OVERRIDE;
......
...@@ -117,7 +117,6 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase { ...@@ -117,7 +117,6 @@ class TestSafeBrowsingDatabase : public SafeBrowsingDatabase {
// can synchronously determine that the URL is safe, CheckUrl returns true, // can synchronously determine that the URL is safe, CheckUrl returns true,
// otherwise it returns false. // otherwise it returns false.
virtual bool ContainsBrowseUrl(const GURL& url, virtual bool ContainsBrowseUrl(const GURL& url,
std::string* matching_list,
std::vector<SBPrefix>* prefix_hits, std::vector<SBPrefix>* prefix_hits,
std::vector<SBFullHashResult>* full_hits, std::vector<SBFullHashResult>* full_hits,
base::Time last_update) OVERRIDE { base::Time last_update) OVERRIDE {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment