| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/predictors/resource_prefetch_predictor.h" | 5 #include "chrome/browser/predictors/resource_prefetch_predictor.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/metrics/sparse_histogram.h" | 13 #include "base/metrics/sparse_histogram.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 18 #include "chrome/browser/chrome_notification_types.h" | 18 #include "chrome/browser/chrome_notification_types.h" |
| 19 #include "chrome/browser/history/history_database.h" | |
| 20 #include "chrome/browser/history/history_notifications.h" | 19 #include "chrome/browser/history/history_notifications.h" |
| 21 #include "chrome/browser/history/history_service.h" | 20 #include "chrome/browser/history/history_service.h" |
| 22 #include "chrome/browser/history/history_service_factory.h" | 21 #include "chrome/browser/history/history_service_factory.h" |
| 23 #include "chrome/browser/predictors/predictor_database.h" | 22 #include "chrome/browser/predictors/predictor_database.h" |
| 24 #include "chrome/browser/predictors/predictor_database_factory.h" | 23 #include "chrome/browser/predictors/predictor_database_factory.h" |
| 25 #include "chrome/browser/predictors/resource_prefetcher_manager.h" | 24 #include "chrome/browser/predictors/resource_prefetcher_manager.h" |
| 26 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
| 28 #include "components/history/core/browser/history_database.h" |
| 29 #include "components/history/core/browser/history_db_task.h" | 29 #include "components/history/core/browser/history_db_task.h" |
| 30 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 31 #include "content/public/browser/navigation_controller.h" | 31 #include "content/public/browser/navigation_controller.h" |
| 32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
| 33 #include "content/public/browser/notification_source.h" | 33 #include "content/public/browser/notification_source.h" |
| 34 #include "content/public/browser/notification_types.h" | 34 #include "content/public/browser/notification_types.h" |
| 35 #include "content/public/browser/resource_request_info.h" | 35 #include "content/public/browser/resource_request_info.h" |
| 36 #include "content/public/browser/web_contents.h" | 36 #include "content/public/browser/web_contents.h" |
| 37 #include "net/base/mime_util.h" | 37 #include "net/base/mime_util.h" |
| 38 #include "net/base/network_change_notifier.h" | 38 #include "net/base/network_change_notifier.h" |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 // HistoryService is already loaded. Continue with Initialization. | 1355 // HistoryService is already loaded. Continue with Initialization. |
| 1356 OnHistoryAndCacheLoaded(); | 1356 OnHistoryAndCacheLoaded(); |
| 1357 return; | 1357 return; |
| 1358 } | 1358 } |
| 1359 DCHECK(!history_service_observer_.IsObserving(history_service)); | 1359 DCHECK(!history_service_observer_.IsObserving(history_service)); |
| 1360 history_service_observer_.Add(history_service); | 1360 history_service_observer_.Add(history_service); |
| 1361 return; | 1361 return; |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 } // namespace predictors | 1364 } // namespace predictors |
| OLD | NEW |