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

Side by Side Diff: chrome/browser/ui/app_list/search/history_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/search/history_factory.h" 5 #include "chrome/browser/ui/app_list/search/history_factory.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "ui/app_list/search/dictionary_data_store.h" 12 #include "ui/app_list/search/dictionary_data_store.h"
13 #include "ui/app_list/search/history.h" 13 #include "ui/app_list/search/history.h"
14 #include "ui/app_list/search/history_data_store.h" 14 #include "ui/app_list/search/history_data_store.h"
15 15
16 namespace app_list { 16 namespace app_list {
17 17
18 // static 18 // static
19 HistoryFactory* HistoryFactory::GetInstance() { 19 HistoryFactory* HistoryFactory::GetInstance() {
20 return Singleton<HistoryFactory>::get(); 20 return base::Singleton<HistoryFactory>::get();
21 } 21 }
22 22
23 // static 23 // static
24 History* HistoryFactory::GetForBrowserContext( 24 History* HistoryFactory::GetForBrowserContext(
25 content::BrowserContext* context) { 25 content::BrowserContext* context) {
26 return static_cast<History*>( 26 return static_cast<History*>(
27 GetInstance()->GetServiceForBrowserContext(context, true)); 27 GetInstance()->GetServiceForBrowserContext(context, true));
28 } 28 }
29 29
30 HistoryFactory::HistoryFactory() 30 HistoryFactory::HistoryFactory()
(...skipping 10 matching lines...) Expand all
41 context->GetPath().AppendASCII(kStoreDataFileName); 41 context->GetPath().AppendASCII(kStoreDataFileName);
42 scoped_refptr<DictionaryDataStore> dictionary_data_store( 42 scoped_refptr<DictionaryDataStore> dictionary_data_store(
43 new DictionaryDataStore(data_file, 43 new DictionaryDataStore(data_file,
44 content::BrowserThread::GetBlockingPool())); 44 content::BrowserThread::GetBlockingPool()));
45 scoped_refptr<HistoryDataStore> history_data_store( 45 scoped_refptr<HistoryDataStore> history_data_store(
46 new HistoryDataStore(dictionary_data_store)); 46 new HistoryDataStore(dictionary_data_store));
47 return new History(history_data_store); 47 return new History(history_data_store);
48 } 48 }
49 49
50 } // namespace app_list 50 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/history_factory.h ('k') | chrome/browser/ui/app_list/start_page_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698