| 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" |
| 17 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 18 #include "base/values.h" | 19 #include "base/values.h" |
| 19 #include "components/data_use_measurement/core/data_use_user_data.h" | 20 #include "components/data_use_measurement/core/data_use_user_data.h" |
| 20 #include "components/google/core/browser/google_util.h" | 21 #include "components/google/core/browser/google_util.h" |
| 21 #include "components/ntp_tiles/constants.h" | 22 #include "components/ntp_tiles/constants.h" |
| 22 #include "components/ntp_tiles/pref_names.h" | 23 #include "components/ntp_tiles/pref_names.h" |
| 23 #include "components/ntp_tiles/switches.h" | 24 #include "components/ntp_tiles/switches.h" |
| 24 #include "components/pref_registry/pref_registry_syncable.h" | 25 #include "components/pref_registry/pref_registry_syncable.h" |
| 25 #include "components/prefs/pref_service.h" | 26 #include "components/prefs/pref_service.h" |
| 26 #include "components/search_engines/search_engine_type.h" | 27 #include "components/search_engines/search_engine_type.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 pending_url_ = GetPopularSitesURL(kPopularSitesDefaultCountryCode, | 352 pending_url_ = GetPopularSitesURL(kPopularSitesDefaultCountryCode, |
| 352 kPopularSitesDefaultVersion); | 353 kPopularSitesDefaultVersion); |
| 353 FetchPopularSites(); | 354 FetchPopularSites(); |
| 354 } else { | 355 } else { |
| 355 DLOG(WARNING) << "Download fallback site list failed"; | 356 DLOG(WARNING) << "Download fallback site list failed"; |
| 356 callback_.Run(false); | 357 callback_.Run(false); |
| 357 } | 358 } |
| 358 } | 359 } |
| 359 | 360 |
| 360 } // namespace ntp_tiles | 361 } // namespace ntp_tiles |
| OLD | NEW |