| 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/physical_web_pages/physical_web_page_suggestio
ns_provider.h" | 5 #include "components/ntp_snippets/physical_web_pages/physical_web_page_suggestio
ns_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/threading/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
| 19 #include "components/grit/components_scaled_resources.h" | 19 #include "components/grit/components_scaled_resources.h" |
| 20 #include "components/ntp_snippets/pref_names.h" | 20 #include "components/ntp_snippets/pref_names.h" |
| 21 #include "components/ntp_snippets/pref_util.h" | 21 #include "components/ntp_snippets/pref_util.h" |
| 22 #include "components/physical_web/data_source/physical_web_data_source.h" | 22 #include "components/physical_web/data_source/physical_web_data_source.h" |
| 23 #include "components/prefs/pref_registry_simple.h" | 23 #include "components/prefs/pref_registry_simple.h" |
| 24 #include "components/prefs/pref_service.h" | 24 #include "components/prefs/pref_service.h" |
| 25 #include "grit/components_strings.h" | 25 #include "components/strings/grit/components_strings.h" |
| 26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
| 27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
| 28 #include "ui/gfx/image/image.h" | 28 #include "ui/gfx/image/image.h" |
| 29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 30 | 30 |
| 31 namespace ntp_snippets { | 31 namespace ntp_snippets { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 const size_t kMaxSuggestionsCount = 10; | 35 const size_t kMaxSuggestionsCount = 10; |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 359 } |
| 360 | 360 |
| 361 void PhysicalWebPageSuggestionsProvider::StoreDismissedIDsToPrefs( | 361 void PhysicalWebPageSuggestionsProvider::StoreDismissedIDsToPrefs( |
| 362 const std::set<std::string>& dismissed_ids) { | 362 const std::set<std::string>& dismissed_ids) { |
| 363 prefs::StoreDismissedIDsToPrefs(pref_service_, | 363 prefs::StoreDismissedIDsToPrefs(pref_service_, |
| 364 prefs::kDismissedPhysicalWebPageSuggestions, | 364 prefs::kDismissedPhysicalWebPageSuggestions, |
| 365 dismissed_ids); | 365 dismissed_ids); |
| 366 } | 366 } |
| 367 | 367 |
| 368 } // namespace ntp_snippets | 368 } // namespace ntp_snippets |
| OLD | NEW |