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

Unified Diff: chrome/browser/safe_browsing/srt_fetcher_win.h

Issue 2700233002: Update SRTFetcher browser test to use ScopedMockTimeMessageLoopTaskRunner (Closed)
Patch Set: Rebase Created 3 years, 10 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
Index: chrome/browser/safe_browsing/srt_fetcher_win.h
diff --git a/chrome/browser/safe_browsing/srt_fetcher_win.h b/chrome/browser/safe_browsing/srt_fetcher_win.h
index c5a0f08e2b4e7acc9ecf3c8fa32b669b10b11045..95c63bda9c022442b51ac3681abffa96239e436d 100644
--- a/chrome/browser/safe_browsing/srt_fetcher_win.h
+++ b/chrome/browser/safe_browsing/srt_fetcher_win.h
@@ -11,15 +11,13 @@
#include <queue>
#include <string>
-#include "base/callback_forward.h"
#include "base/command_line.h"
-#include "base/feature_list.h"
-#include "base/memory/ref_counted.h"
-#include "base/version.h"
+#include "base/time/time.h"
namespace base {
class FilePath;
class TaskRunner;
+class Version;
}
class Browser;
@@ -95,12 +93,9 @@ using SwReporterQueue = std::queue<SwReporterInvocation>;
// queue of SwReporters to execute as a single "run". When a new try is
// scheduled the entire queue is executed.
//
-// |version| is the version of the tool that will run. The task runners are
-// provided to allow tests to provide their own.
+// |version| is the version of the tool that will run.
void RunSwReporters(const SwReporterQueue& invocations,
- const base::Version& version,
- scoped_refptr<base::TaskRunner> main_thread_task_runner,
- scoped_refptr<base::TaskRunner> blocking_task_runner);
+ const base::Version& version);
// Returns true iff Local State is successfully accessed and indicates the most
// recent Reporter run terminated with an exit code indicating the presence of
@@ -125,11 +120,11 @@ class SwReporterTestingDelegate {
virtual void TriggerPrompt(Browser* browser,
const std::string& reporter_version) = 0;
- // Callback to let the tests know the reporter is ready to launch.
- virtual void NotifyLaunchReady() = 0;
+ // Returns the test's idea of the current time.
+ virtual base::Time Now() const = 0;
- // Callback to let the tests know the reporter has finished running.
- virtual void NotifyReporterDone() = 0;
+ // A task runner used to spawn the reporter process (which blocks).
+ virtual base::TaskRunner* BlockingTaskRunner() const = 0;
};
// Set a delegate for testing. The implementation will not take ownership of
« no previous file with comments | « chrome/browser/safe_browsing/srt_fetcher_browsertest_win.cc ('k') | chrome/browser/safe_browsing/srt_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698