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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/callback_list.h" | 11 #include "base/callback_list.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/optional.h" | 13 #include "base/optional.h" |
14 #include "components/keyed_service/core/keyed_service.h" | 14 #include "components/keyed_service/core/keyed_service.h" |
15 #include "components/suggestions/proto/suggestions.pb.h" | 15 #include "components/suggestions/proto/suggestions.pb.h" |
16 #include "url/gurl.h" | 16 #include "url/gurl.h" |
17 | 17 |
18 namespace gfx { | 18 namespace gfx { |
19 class Image; | 19 class Image; |
20 } // namespce gfx | 20 } // namespace gfx |
21 | 21 |
22 namespace suggestions { | 22 namespace suggestions { |
23 | 23 |
24 // An interface to fetch server suggestions asynchronously. | 24 // An interface to fetch server suggestions asynchronously. |
25 class SuggestionsService : public KeyedService { | 25 class SuggestionsService : public KeyedService { |
26 public: | 26 public: |
27 using ResponseCallback = base::Callback<void(const SuggestionsProfile&)>; | 27 using ResponseCallback = base::Callback<void(const SuggestionsProfile&)>; |
28 using BitmapCallback = base::Callback<void(const GURL&, const gfx::Image&)>; | 28 using BitmapCallback = base::Callback<void(const GURL&, const gfx::Image&)>; |
29 | 29 |
30 using ResponseCallbackList = | 30 using ResponseCallbackList = |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // on failure. | 63 // on failure. |
64 virtual bool UndoBlacklistURL(const GURL& url) = 0; | 64 virtual bool UndoBlacklistURL(const GURL& url) = 0; |
65 | 65 |
66 // Removes all URLs from the blacklist. | 66 // Removes all URLs from the blacklist. |
67 virtual void ClearBlacklist() = 0; | 67 virtual void ClearBlacklist() = 0; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace suggestions | 70 } // namespace suggestions |
71 | 71 |
72 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ | 72 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ |
OLD | NEW |