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

Unified Diff: chrome/browser/ui/app_list/search/history.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
« no previous file with comments | « chrome/browser/ui/app_list/search/history.h ('k') | chrome/browser/ui/app_list/search/history_data_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/history.cc
diff --git a/chrome/browser/ui/app_list/search/history.cc b/chrome/browser/ui/app_list/search/history.cc
index 195a10daf14accb826c37cfad8dcbedb28555964..428109ed6a29f1d3cb7f6d18d0677d53029921f6 100644
--- a/chrome/browser/ui/app_list/search/history.cc
+++ b/chrome/browser/ui/app_list/search/history.cc
@@ -4,12 +4,10 @@
#include "chrome/browser/ui/app_list/search/history.h"
-#include "base/files/file_path.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/app_list/search/history_data.h"
#include "chrome/browser/ui/app_list/search/history_data_store.h"
-#include "content/public/browser/browser_context.h"
#include "ui/app_list/search/tokenized_string.h"
namespace app_list {
@@ -24,16 +22,12 @@ std::string NormalizeString(const std::string& utf8) {
} // namespace
-History::History(content::BrowserContext* context)
- : browser_context_(context),
+History::History(scoped_refptr<HistoryDataStore> store)
+ : store_(store),
data_loaded_(false) {
- const char kStoreDataFileName[] = "App Launcher Search";
const size_t kMaxQueryEntries = 1000;
const size_t kMaxSecondaryQueries = 5;
- const base::FilePath data_file =
- browser_context_->GetPath().AppendASCII(kStoreDataFileName);
- store_ = new HistoryDataStore(data_file);
data_.reset(
new HistoryData(store_.get(), kMaxQueryEntries, kMaxSecondaryQueries));
data_->AddObserver(this);
« no previous file with comments | « chrome/browser/ui/app_list/search/history.h ('k') | chrome/browser/ui/app_list/search/history_data_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698