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

Side by Side Diff: chrome/browser/search/suggestions/suggestions_service_factory.cc

Issue 410673002: [Suggestions] Moving suggestions code to a new component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/search/suggestions/suggestions_service_factory.h" 5 #include "chrome/browser/search/suggestions/suggestions_service_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" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/profiles/incognito_helpers.h" 9 #include "chrome/browser/profiles/incognito_helpers.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search/suggestions/blacklist_store.h"
12 #include "chrome/browser/search/suggestions/image_manager.h"
13 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h"
14 #include "chrome/browser/search/suggestions/suggestions_service.h"
15 #include "chrome/browser/search/suggestions/suggestions_store.h"
16 #include "chrome/browser/search/suggestions/thumbnail_manager.h" 11 #include "chrome/browser/search/suggestions/thumbnail_manager.h"
17 #include "chrome/common/pref_names.h"
18 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
19 #include "components/leveldb_proto/proto_database.h" 13 #include "components/leveldb_proto/proto_database.h"
20 #include "components/leveldb_proto/proto_database_impl.h" 14 #include "components/leveldb_proto/proto_database_impl.h"
21 #include "components/pref_registry/pref_registry_syncable.h" 15 #include "components/pref_registry/pref_registry_syncable.h"
16 #include "components/suggestions/blacklist_store.h"
17 #include "components/suggestions/image_manager.h"
18 #include "components/suggestions/proto/suggestions.pb.h"
19 #include "components/suggestions/suggestions_service.h"
20 #include "components/suggestions/suggestions_store.h"
22 #include "content/public/browser/browser_context.h" 21 #include "content/public/browser/browser_context.h"
23 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
24 23
25 namespace suggestions { 24 namespace suggestions {
26 25
27 // static 26 // static
28 SuggestionsService* SuggestionsServiceFactory::GetForProfile(Profile* profile) { 27 SuggestionsService* SuggestionsServiceFactory::GetForProfile(Profile* profile) {
29 if (!SuggestionsService::IsEnabled() || profile->IsOffTheRecord()) 28 if (!SuggestionsService::IsEnabled() || profile->IsOffTheRecord())
30 return NULL; 29 return NULL;
31 30
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 the_profile->GetRequestContext(), suggestions_store.Pass(), 77 the_profile->GetRequestContext(), suggestions_store.Pass(),
79 thumbnail_manager.PassAs<ImageManager>(), blacklist_store.Pass()); 78 thumbnail_manager.PassAs<ImageManager>(), blacklist_store.Pass());
80 } 79 }
81 80
82 void SuggestionsServiceFactory::RegisterProfilePrefs( 81 void SuggestionsServiceFactory::RegisterProfilePrefs(
83 user_prefs::PrefRegistrySyncable* registry) { 82 user_prefs::PrefRegistrySyncable* registry) {
84 SuggestionsService::RegisterProfilePrefs(registry); 83 SuggestionsService::RegisterProfilePrefs(registry);
85 } 84 }
86 85
87 } // namespace suggestions 86 } // namespace suggestions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698