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

Unified Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 11615011: Small modifications to safebrowsing code to make it simpler to add the extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: seriously there is a macro called check() in AssertMacros.h wow Created 7 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/database_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_browsertest.cc
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index bba7499ae6b028a43d445db23dce9a1dc3843753..44a232d6605239170c068307797efcd79499cb9f 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include <deque>
+#include <vector>
#include "base/command_line.h"
#include "base/path_service.h"
@@ -27,6 +28,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/database_manager.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "chrome/browser/task_manager/task_manager.h"
#include "chrome/browser/task_manager/task_manager_browsertest_util.h"
#include "chrome/browser/ui/browser.h"
@@ -53,6 +55,7 @@
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
+#include "googleurl/src/gurl.h"
#include "grit/generated_resources.h"
#include "net/base/mock_host_resolver.h"
#include "net/url_request/url_request_context.h"
@@ -499,11 +502,13 @@ class FakeSafeBrowsingDatabaseManager : public SafeBrowsingDatabaseManager {
virtual ~FakeSafeBrowsingDatabaseManager() {}
void OnCheckBrowseURLDone(const GURL& gurl, Client* client) {
- SafeBrowsingDatabaseManager::SafeBrowsingCheck check;
- check.urls.push_back(gurl);
- check.client = client;
- check.threat_type = threat_type_;
- client->OnSafeBrowsingResult(check);
+ SafeBrowsingDatabaseManager::SafeBrowsingCheck sb_check(
+ std::vector<GURL>(1, gurl),
+ std::vector<SBFullHash>(),
+ client,
+ safe_browsing_util::MALWARE);
+ sb_check.url_results[0] = threat_type_;
+ client->OnSafeBrowsingResult(sb_check);
}
GURL url_;
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698