| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The history system runs on a background thread so that potentially slow | 5 // The history system runs on a background thread so that potentially slow |
| 6 // database operations don't delay the browser. This backend processing is | 6 // database operations don't delay the browser. This backend processing is |
| 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to | 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to |
| 8 // that thread. | 8 // that thread. |
| 9 // | 9 // |
| 10 // Main thread History thread | 10 // Main thread History thread |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 #include "base/bind_helpers.h" | 27 #include "base/bind_helpers.h" |
| 28 #include "base/callback.h" | 28 #include "base/callback.h" |
| 29 #include "base/command_line.h" | 29 #include "base/command_line.h" |
| 30 #include "base/compiler_specific.h" | 30 #include "base/compiler_specific.h" |
| 31 #include "base/json/json_writer.h" | 31 #include "base/json/json_writer.h" |
| 32 #include "base/location.h" | 32 #include "base/location.h" |
| 33 #include "base/memory/ref_counted.h" | 33 #include "base/memory/ref_counted.h" |
| 34 #include "base/message_loop.h" | 34 #include "base/message_loop.h" |
| 35 #include "base/path_service.h" | 35 #include "base/path_service.h" |
| 36 #include "base/prefs/pref_service.h" |
| 36 #include "base/rand_util.h" | 37 #include "base/rand_util.h" |
| 37 #include "base/sequenced_task_runner.h" | 38 #include "base/sequenced_task_runner.h" |
| 38 #include "base/string_util.h" | 39 #include "base/string_util.h" |
| 39 #include "base/thread_task_runner_handle.h" | 40 #include "base/thread_task_runner_handle.h" |
| 40 #include "base/threading/thread.h" | 41 #include "base/threading/thread.h" |
| 41 #include "base/time.h" | 42 #include "base/time.h" |
| 42 #include "chrome/browser/autocomplete/history_url_provider.h" | 43 #include "chrome/browser/autocomplete/history_url_provider.h" |
| 43 #include "chrome/browser/bookmarks/bookmark_model.h" | 44 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 44 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 45 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 45 #include "chrome/browser/browser_process.h" | 46 #include "chrome/browser/browser_process.h" |
| 46 #include "chrome/browser/history/download_row.h" | 47 #include "chrome/browser/history/download_row.h" |
| 47 #include "chrome/browser/history/history_backend.h" | 48 #include "chrome/browser/history/history_backend.h" |
| 48 #include "chrome/browser/history/history_notifications.h" | 49 #include "chrome/browser/history/history_notifications.h" |
| 49 #include "chrome/browser/history/history_types.h" | 50 #include "chrome/browser/history/history_types.h" |
| 50 #include "chrome/browser/history/in_memory_database.h" | 51 #include "chrome/browser/history/in_memory_database.h" |
| 51 #include "chrome/browser/history/in_memory_history_backend.h" | 52 #include "chrome/browser/history/in_memory_history_backend.h" |
| 52 #include "chrome/browser/history/in_memory_url_index.h" | 53 #include "chrome/browser/history/in_memory_url_index.h" |
| 53 #include "chrome/browser/history/top_sites.h" | 54 #include "chrome/browser/history/top_sites.h" |
| 54 #include "chrome/browser/history/visit_database.h" | 55 #include "chrome/browser/history/visit_database.h" |
| 55 #include "chrome/browser/history/visit_filter.h" | 56 #include "chrome/browser/history/visit_filter.h" |
| 56 #include "chrome/browser/prefs/pref_service.h" | |
| 57 #include "chrome/browser/profiles/profile.h" | 57 #include "chrome/browser/profiles/profile.h" |
| 58 #include "chrome/browser/ui/profile_error_dialog.h" | 58 #include "chrome/browser/ui/profile_error_dialog.h" |
| 59 #include "chrome/common/chrome_constants.h" | 59 #include "chrome/common/chrome_constants.h" |
| 60 #include "chrome/common/chrome_notification_types.h" | 60 #include "chrome/common/chrome_notification_types.h" |
| 61 #include "chrome/common/chrome_switches.h" | 61 #include "chrome/common/chrome_switches.h" |
| 62 #include "chrome/common/pref_names.h" | 62 #include "chrome/common/pref_names.h" |
| 63 #include "chrome/common/thumbnail_score.h" | 63 #include "chrome/common/thumbnail_score.h" |
| 64 #include "chrome/common/url_constants.h" | 64 #include "chrome/common/url_constants.h" |
| 65 #include "components/visitedlink/browser/visitedlink_master.h" | 65 #include "components/visitedlink/browser/visitedlink_master.h" |
| 66 #include "content/public/browser/browser_thread.h" | 66 #include "content/public/browser/browser_thread.h" |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 } | 1355 } |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 void HistoryService::OnDeleteDirectiveProcessed( | 1358 void HistoryService::OnDeleteDirectiveProcessed( |
| 1359 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive) { | 1359 const sync_pb::HistoryDeleteDirectiveSpecifics& delete_directive) { |
| 1360 DVLOG(1) << "Processed delete directive: " | 1360 DVLOG(1) << "Processed delete directive: " |
| 1361 << DeleteDirectiveToString(delete_directive); | 1361 << DeleteDirectiveToString(delete_directive); |
| 1362 // TODO(akalin): Keep track of which delete directives we've already | 1362 // TODO(akalin): Keep track of which delete directives we've already |
| 1363 // processed. | 1363 // processed. |
| 1364 } | 1364 } |
| OLD | NEW |