OLD | NEW |
---|---|
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" |
huangs
2014/07/17 18:23:35
The .h file should include "base/memory/scoped_ptr
Mathieu
2014/07/17 18:29:12
Acknowledged.
| |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/profiles/incognito_helpers.h" | 8 #include "chrome/browser/profiles/incognito_helpers.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/search/suggestions/blacklist_store.h" | 10 #include "chrome/browser/search/suggestions/blacklist_store.h" |
11 #include "chrome/browser/search/suggestions/image_manager.h" | |
11 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" | 12 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" |
12 #include "chrome/browser/search/suggestions/suggestions_service.h" | 13 #include "chrome/browser/search/suggestions/suggestions_service.h" |
13 #include "chrome/browser/search/suggestions/suggestions_store.h" | 14 #include "chrome/browser/search/suggestions/suggestions_store.h" |
15 #include "chrome/browser/search/suggestions/thumbnail_manager.h" | |
14 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
15 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 17 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
16 #include "components/leveldb_proto/proto_database.h" | 18 #include "components/leveldb_proto/proto_database.h" |
17 #include "components/leveldb_proto/proto_database_impl.h" | 19 #include "components/leveldb_proto/proto_database_impl.h" |
18 #include "components/pref_registry/pref_registry_syncable.h" | 20 #include "components/pref_registry/pref_registry_syncable.h" |
19 #include "content/public/browser/browser_context.h" | 21 #include "content/public/browser/browser_context.h" |
20 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
21 | 23 |
22 namespace suggestions { | 24 namespace suggestions { |
23 | 25 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 background_task_runner)); | 68 background_task_runner)); |
67 | 69 |
68 base::FilePath database_dir( | 70 base::FilePath database_dir( |
69 the_profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails"))); | 71 the_profile->GetPath().Append(FILE_PATH_LITERAL("Thumbnails"))); |
70 | 72 |
71 scoped_ptr<ThumbnailManager> thumbnail_manager(new ThumbnailManager( | 73 scoped_ptr<ThumbnailManager> thumbnail_manager(new ThumbnailManager( |
72 the_profile->GetRequestContext(), | 74 the_profile->GetRequestContext(), |
73 db.PassAs<leveldb_proto::ProtoDatabase<ThumbnailData> >(), database_dir)); | 75 db.PassAs<leveldb_proto::ProtoDatabase<ThumbnailData> >(), database_dir)); |
74 return new SuggestionsService( | 76 return new SuggestionsService( |
75 the_profile->GetRequestContext(), suggestions_store.Pass(), | 77 the_profile->GetRequestContext(), suggestions_store.Pass(), |
76 thumbnail_manager.Pass(), blacklist_store.Pass()); | 78 thumbnail_manager.PassAs<ImageManager>(), blacklist_store.Pass()); |
77 } | 79 } |
78 | 80 |
79 void SuggestionsServiceFactory::RegisterProfilePrefs( | 81 void SuggestionsServiceFactory::RegisterProfilePrefs( |
80 user_prefs::PrefRegistrySyncable* registry) { | 82 user_prefs::PrefRegistrySyncable* registry) { |
81 SuggestionsService::RegisterProfilePrefs(registry); | 83 SuggestionsService::RegisterProfilePrefs(registry); |
82 } | 84 } |
83 | 85 |
84 } // namespace suggestions | 86 } // namespace suggestions |
OLD | NEW |