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/sessions/foreign_sessions_suggestions_provider
.h" | 5 #include "components/ntp_snippets/sessions/foreign_sessions_suggestions_provider
.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <tuple> | 9 #include <tuple> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.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/time/time.h" | 15 #include "base/time/time.h" |
15 #include "components/ntp_snippets/category.h" | 16 #include "components/ntp_snippets/category.h" |
16 #include "components/ntp_snippets/category_info.h" | 17 #include "components/ntp_snippets/category_info.h" |
17 #include "components/ntp_snippets/content_suggestion.h" | 18 #include "components/ntp_snippets/content_suggestion.h" |
18 #include "components/ntp_snippets/features.h" | 19 #include "components/ntp_snippets/features.h" |
19 #include "components/ntp_snippets/pref_names.h" | 20 #include "components/ntp_snippets/pref_names.h" |
20 #include "components/ntp_snippets/pref_util.h" | 21 #include "components/ntp_snippets/pref_util.h" |
21 #include "components/prefs/pref_registry_simple.h" | 22 #include "components/prefs/pref_registry_simple.h" |
22 #include "components/prefs/pref_service.h" | 23 #include "components/prefs/pref_service.h" |
23 #include "components/sessions/core/session_types.h" | 24 #include "components/sessions/core/session_types.h" |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 data.navigation->virtual_url().spec(), | 400 data.navigation->virtual_url().spec(), |
400 data.navigation->virtual_url()); | 401 data.navigation->virtual_url()); |
401 suggestion.set_title(data.navigation->title()); | 402 suggestion.set_title(data.navigation->title()); |
402 suggestion.set_publish_date(data.tab->timestamp); | 403 suggestion.set_publish_date(data.tab->timestamp); |
403 suggestion.set_publisher_name( | 404 suggestion.set_publisher_name( |
404 base::UTF8ToUTF16(data.navigation->virtual_url().host())); | 405 base::UTF8ToUTF16(data.navigation->virtual_url().host())); |
405 return suggestion; | 406 return suggestion; |
406 } | 407 } |
407 | 408 |
408 } // namespace ntp_snippets | 409 } // namespace ntp_snippets |
OLD | NEW |