OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_tiles/popular_sites_impl.h" | 5 #include "components/ntp_tiles/popular_sites_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/threading/sequenced_worker_pool.h" | |
18 #include "base/time/time.h" | 17 #include "base/time/time.h" |
19 #include "base/values.h" | 18 #include "base/values.h" |
20 #include "components/data_use_measurement/core/data_use_user_data.h" | 19 #include "components/data_use_measurement/core/data_use_user_data.h" |
21 #include "components/google/core/browser/google_util.h" | 20 #include "components/google/core/browser/google_util.h" |
22 #include "components/ntp_tiles/constants.h" | 21 #include "components/ntp_tiles/constants.h" |
23 #include "components/ntp_tiles/pref_names.h" | 22 #include "components/ntp_tiles/pref_names.h" |
24 #include "components/ntp_tiles/switches.h" | 23 #include "components/ntp_tiles/switches.h" |
25 #include "components/pref_registry/pref_registry_syncable.h" | 24 #include "components/pref_registry/pref_registry_syncable.h" |
26 #include "components/prefs/pref_service.h" | 25 #include "components/prefs/pref_service.h" |
27 #include "components/search_engines/search_engine_type.h" | 26 #include "components/search_engines/search_engine_type.h" |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 pending_url_ = GetPopularSitesURL(kPopularSitesDefaultCountryCode, | 351 pending_url_ = GetPopularSitesURL(kPopularSitesDefaultCountryCode, |
353 kPopularSitesDefaultVersion); | 352 kPopularSitesDefaultVersion); |
354 FetchPopularSites(); | 353 FetchPopularSites(); |
355 } else { | 354 } else { |
356 DLOG(WARNING) << "Download fallback site list failed"; | 355 DLOG(WARNING) << "Download fallback site list failed"; |
357 callback_.Run(false); | 356 callback_.Run(false); |
358 } | 357 } |
359 } | 358 } |
360 | 359 |
361 } // namespace ntp_tiles | 360 } // namespace ntp_tiles |
OLD | NEW |