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

Unified Diff: chrome/browser/ui/app_list/search/history_factory.cc

Issue 518293002: App-list history cleanup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix Created 6 years, 3 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/ui/app_list/search/history_factory.cc
diff --git a/chrome/browser/ui/app_list/search/history_factory.cc b/chrome/browser/ui/app_list/search/history_factory.cc
index ee2bb7c3ae75a157ab13363709ff05b27047330d..08d90cee7204dd49ac06f480424269bd36dbbd3e 100644
--- a/chrome/browser/ui/app_list/search/history_factory.cc
+++ b/chrome/browser/ui/app_list/search/history_factory.cc
@@ -4,9 +4,13 @@
#include "chrome/browser/ui/app_list/search/history_factory.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
+#include "chrome/browser/ui/app_list/search/common/dictionary_data_store.h"
#include "chrome/browser/ui/app_list/search/history.h"
+#include "chrome/browser/ui/app_list/search/history_data_store.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "content/public/browser/browser_context.h"
namespace app_list {
@@ -31,7 +35,14 @@ HistoryFactory::~HistoryFactory() {}
KeyedService* HistoryFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new History(context);
+ const char kStoreDataFileName[] = "App Launcher Search";
+ const base::FilePath data_file =
+ context->GetPath().AppendASCII(kStoreDataFileName);
+ scoped_refptr<DictionaryDataStore> dictionary_data_store(
+ new DictionaryDataStore(data_file));
+ scoped_refptr<HistoryDataStore> history_data_store(
+ new HistoryDataStore(dictionary_data_store));
+ return new History(history_data_store);
}
} // namespace app_list

Powered by Google App Engine
This is Rietveld 408576698