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

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

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.h
diff --git a/chrome/browser/ui/app_list/search/history_factory.h b/chrome/browser/ui/app_list/search/history_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..c09fa728917c168008aece37b7a324dc624eff7d
--- /dev/null
+++ b/chrome/browser/ui/app_list/search/history_factory.h
@@ -0,0 +1,43 @@
+// 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.
+
+#ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_H_
+#define CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_H_
+
+#include "base/memory/singleton.h"
tfarina 2013/05/23 22:56:25 could you forward declare this instead? template
xiyuan 2013/05/24 16:33:02 Done.
+#include "components/browser_context_keyed_service/browser_context_keyed_service_factory.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace app_list {
+
+class History;
+
+// Singleton that owns all History and associates them with profiles;
+class HistoryFactory : public BrowserContextKeyedServiceFactory {
+ public:
+ // Returns singleton instance of HistoryFactory.
+ static HistoryFactory* GetInstance();
+
+ // Returns History associated with |context|.
+ static History* GetForBrowserContext(content::BrowserContext* context);
+
+ private:
+ friend struct DefaultSingletonTraits<HistoryFactory>;
+
+ HistoryFactory();
+ virtual ~HistoryFactory();
+
+ // BrowserContextKeyedServiceFactory overrides:
+ virtual BrowserContextKeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* context) const OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(HistoryFactory);
+};
+
+} // namespace app_list
+
+#endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_HISTORY_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698