| 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 #ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 5 #ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 
| 6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 54 | 54 | 
| 55   // Class taking ownership of |suggestions_store|, |thumbnail_manager| and | 55   // Class taking ownership of |suggestions_store|, |thumbnail_manager| and | 
| 56   // |blacklist_store|. | 56   // |blacklist_store|. | 
| 57   SuggestionsService( | 57   SuggestionsService( | 
| 58       net::URLRequestContextGetter* url_request_context, | 58       net::URLRequestContextGetter* url_request_context, | 
| 59       scoped_ptr<SuggestionsStore> suggestions_store, | 59       scoped_ptr<SuggestionsStore> suggestions_store, | 
| 60       scoped_ptr<ImageManager> thumbnail_manager, | 60       scoped_ptr<ImageManager> thumbnail_manager, | 
| 61       scoped_ptr<BlacklistStore> blacklist_store); | 61       scoped_ptr<BlacklistStore> blacklist_store); | 
| 62   ~SuggestionsService() override; | 62   ~SuggestionsService() override; | 
| 63 | 63 | 
| 64   // Whether this service is enabled. |  | 
| 65   static bool IsEnabled(); |  | 
| 66 |  | 
| 67   // Whether the user is part of a control group. | 64   // Whether the user is part of a control group. | 
| 68   static bool IsControlGroup(); | 65   static bool IsControlGroup(); | 
| 69 | 66 | 
| 70   // Request suggestions data, which will be passed to |callback|. |sync_state| | 67   // Request suggestions data, which will be passed to |callback|. |sync_state| | 
| 71   // will influence the behavior of this function (see SyncState definition). | 68   // will influence the behavior of this function (see SyncState definition). | 
| 72   // | 69   // | 
| 73   // |sync_state| must be specified based on the current state of the system | 70   // |sync_state| must be specified based on the current state of the system | 
| 74   // (see suggestions::GetSyncState). Callers should call this function again if | 71   // (see suggestions::GetSyncState). Callers should call this function again if | 
| 75   // sync state changes. | 72   // sync state changes. | 
| 76   // | 73   // | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 190 | 187 | 
| 191   // For callbacks may be run after destruction. | 188   // For callbacks may be run after destruction. | 
| 192   base::WeakPtrFactory<SuggestionsService> weak_ptr_factory_; | 189   base::WeakPtrFactory<SuggestionsService> weak_ptr_factory_; | 
| 193 | 190 | 
| 194   DISALLOW_COPY_AND_ASSIGN(SuggestionsService); | 191   DISALLOW_COPY_AND_ASSIGN(SuggestionsService); | 
| 195 }; | 192 }; | 
| 196 | 193 | 
| 197 }  // namespace suggestions | 194 }  // namespace suggestions | 
| 198 | 195 | 
| 199 #endif  // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 196 #endif  // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 
| OLD | NEW | 
|---|