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

Unified Diff: chrome/browser/ui/app_list/search/app_search_provider.h

Issue 789623003: Use base::Clock instead of base::Time::Now in AppSearchProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@now_source
Patch Set: rebase Created 6 years 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/ui/app_list/search/app_search_provider.h
diff --git a/chrome/browser/ui/app_list/search/app_search_provider.h b/chrome/browser/ui/app_list/search/app_search_provider.h
index fb2082683cc7d0c838a66f7a16d8233dc36bd68b..5b74ff102cfc9559f1dc3b4688726b932438af57 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider.h
+++ b/chrome/browser/ui/app_list/search/app_search_provider.h
@@ -14,6 +14,10 @@
class AppListControllerDelegate;
class Profile;
+namespace base {
+class Clock;
+}
+
namespace extensions {
class ExtensionRegistry;
class ExtensionSet;
@@ -29,7 +33,8 @@ class AppSearchProvider : public SearchProvider,
public extensions::ExtensionRegistryObserver {
public:
AppSearchProvider(Profile* profile,
- AppListControllerDelegate* list_controller);
+ AppListControllerDelegate* list_controller,
+ scoped_ptr<base::Clock> clock);
~AppSearchProvider() override;
// SearchProvider overrides:
@@ -40,9 +45,6 @@ class AppSearchProvider : public SearchProvider,
class App;
typedef ScopedVector<App> Apps;
- friend test::AppSearchProviderTest;
-
- void StartImpl(const base::Time& current_time, const base::string16& query);
void UpdateResults();
// Adds extensions to apps container if they should be displayed.
@@ -60,7 +62,6 @@ class AppSearchProvider : public SearchProvider,
AppListControllerDelegate* list_controller_;
base::string16 query_;
- base::Time search_time_;
ScopedObserver<extensions::ExtensionRegistry,
extensions::ExtensionRegistryObserver>
@@ -68,6 +69,8 @@ class AppSearchProvider : public SearchProvider,
Apps apps_;
+ scoped_ptr<base::Clock> clock_;
+
DISALLOW_COPY_AND_ASSIGN(AppSearchProvider);
};
« no previous file with comments | « chrome/browser/ui/app_list/search/app_result.cc ('k') | chrome/browser/ui/app_list/search/app_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698