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

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

Issue 15875007: app_list: Search result launch history and boost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for comments in #3 Created 7 years, 7 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
new file mode 100644
index 0000000000000000000000000000000000000000..90152f8535930c4a6307f1d7f1d1e2e11e7781c2
--- /dev/null
+++ b/chrome/browser/ui/app_list/search/history_factory.cc
@@ -0,0 +1,36 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/app_list/search/history_factory.h"
+
+#include "chrome/browser/ui/app_list/search/history.h"
+#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
+
+namespace app_list {
+
+// static
+HistoryFactory* HistoryFactory::GetInstance() {
+ return Singleton<HistoryFactory>::get();
+}
+
+// static
+History* HistoryFactory::GetForBrowserContext(
+ content::BrowserContext* context) {
+ return static_cast<History*>(
+ GetInstance()->GetServiceForBrowserContext(context, true));
+}
+
+HistoryFactory::HistoryFactory()
+ : BrowserContextKeyedServiceFactory(
+ "app_list::History",
+ BrowserContextDependencyManager::GetInstance()) {}
+
+HistoryFactory::~HistoryFactory() {}
+
+BrowserContextKeyedService* HistoryFactory::BuildServiceInstanceFor(
+ content::BrowserContext* context) const {
+ return new History(context);
+}
+
+} // namespace app_list

Powered by Google App Engine
This is Rietveld 408576698