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

Side by Side Diff: chrome/browser/autocomplete/shortcuts_backend_factory.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/autocomplete/shortcuts_backend_factory.h" 5 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/autocomplete/shortcuts_extensions_manager.h" 8 #include "chrome/browser/autocomplete/shortcuts_extensions_manager.h"
10 #include "chrome/browser/history/history_service_factory.h" 9 #include "chrome/browser/history/history_service_factory.h"
11 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/search_engines/template_url_service_factory.h" 11 #include "chrome/browser/search_engines/template_url_service_factory.h"
13 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" 12 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
14 #include "components/keyed_service/content/browser_context_dependency_manager.h" 13 #include "components/keyed_service/content/browser_context_dependency_manager.h"
15 #include "components/omnibox/browser/shortcuts_backend.h" 14 #include "components/omnibox/browser/shortcuts_backend.h"
16 #include "components/omnibox/browser/shortcuts_constants.h" 15 #include "components/omnibox/browser/shortcuts_constants.h"
16 #include "components/prefs/pref_service.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 18
19 namespace { 19 namespace {
20 #if defined(ENABLE_EXTENSIONS) 20 #if defined(ENABLE_EXTENSIONS)
21 const char kShortcutsExtensionsManagerKey[] = "ShortcutsExtensionsManager"; 21 const char kShortcutsExtensionsManagerKey[] = "ShortcutsExtensionsManager";
22 #endif 22 #endif
23 } 23 }
24 24
25 // static 25 // static
26 scoped_refptr<ShortcutsBackend> ShortcutsBackendFactory::GetForProfile( 26 scoped_refptr<ShortcutsBackend> ShortcutsBackendFactory::GetForProfile(
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 content::BrowserThread::GetMessageLoopProxyForThread( 96 content::BrowserThread::GetMessageLoopProxyForThread(
97 content::BrowserThread::DB), 97 content::BrowserThread::DB),
98 profile->GetPath().Append(kShortcutsDatabaseName), suppress_db)); 98 profile->GetPath().Append(kShortcutsDatabaseName), suppress_db));
99 #if defined(ENABLE_EXTENSIONS) 99 #if defined(ENABLE_EXTENSIONS)
100 ShortcutsExtensionsManager* extensions_manager = 100 ShortcutsExtensionsManager* extensions_manager =
101 new ShortcutsExtensionsManager(profile); 101 new ShortcutsExtensionsManager(profile);
102 profile->SetUserData(kShortcutsExtensionsManagerKey, extensions_manager); 102 profile->SetUserData(kShortcutsExtensionsManagerKey, extensions_manager);
103 #endif 103 #endif
104 return backend->Init() ? backend : nullptr; 104 return backend->Init() ? backend : nullptr;
105 } 105 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/search_provider_unittest.cc ('k') | chrome/browser/autocomplete/shortcuts_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698