OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h" | 5 #include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "components/bookmarks/browser/bookmark_model.h" | 16 #include "components/bookmarks/browser/bookmark_model.h" |
17 #include "components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h" | 17 #include "components/ntp_snippets/bookmarks/bookmark_last_visit_utils.h" |
18 #include "components/ntp_snippets/category.h" | 18 #include "components/ntp_snippets/category.h" |
19 #include "components/ntp_snippets/content_suggestion.h" | 19 #include "components/ntp_snippets/content_suggestion.h" |
20 #include "components/ntp_snippets/features.h" | 20 #include "components/ntp_snippets/features.h" |
21 #include "components/ntp_snippets/pref_names.h" | 21 #include "components/ntp_snippets/pref_names.h" |
22 #include "components/prefs/pref_registry_simple.h" | 22 #include "components/prefs/pref_registry_simple.h" |
23 #include "components/prefs/pref_service.h" | 23 #include "components/prefs/pref_service.h" |
| 24 #include "components/strings/grit/components_strings.h" |
24 #include "components/variations/variations_associated_data.h" | 25 #include "components/variations/variations_associated_data.h" |
25 #include "grit/components_strings.h" | |
26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
27 #include "ui/gfx/image/image.h" | 27 #include "ui/gfx/image/image.h" |
28 | 28 |
29 using bookmarks::BookmarkModel; | 29 using bookmarks::BookmarkModel; |
30 using bookmarks::BookmarkNode; | 30 using bookmarks::BookmarkNode; |
31 | 31 |
32 namespace ntp_snippets { | 32 namespace ntp_snippets { |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 void BookmarkSuggestionsProvider::NotifyStatusChanged( | 319 void BookmarkSuggestionsProvider::NotifyStatusChanged( |
320 CategoryStatus new_status) { | 320 CategoryStatus new_status) { |
321 if (category_status_ == new_status) { | 321 if (category_status_ == new_status) { |
322 return; | 322 return; |
323 } | 323 } |
324 category_status_ = new_status; | 324 category_status_ = new_status; |
325 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); | 325 observer()->OnCategoryStatusChanged(this, provided_category_, new_status); |
326 } | 326 } |
327 | 327 |
328 } // namespace ntp_snippets | 328 } // namespace ntp_snippets |
OLD | NEW |