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 #include "chrome/browser/history/history_backend.h" | 5 #include "chrome/browser/history/history_backend.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
11 #include <set> | 11 #include <set> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/bind.h" | 15 #include "base/bind.h" |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/files/file_enumerator.h" | 17 #include "base/files/file_enumerator.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/memory/scoped_vector.h" | 19 #include "base/memory/scoped_vector.h" |
20 #include "base/message_loop/message_loop.h" | 20 #include "base/message_loop/message_loop.h" |
21 #include "base/metrics/histogram.h" | 21 #include "base/metrics/histogram.h" |
22 #include "base/rand_util.h" | 22 #include "base/rand_util.h" |
23 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
24 #include "base/strings/utf_string_conversions.h" | 24 #include "base/strings/utf_string_conversions.h" |
25 #include "base/time/time.h" | 25 #include "base/time/time.h" |
26 #include "chrome/browser/chrome_notification_types.h" | |
27 #include "chrome/browser/history/in_memory_history_backend.h" | |
28 #include "chrome/browser/history/in_memory_history_backend.h" | 26 #include "chrome/browser/history/in_memory_history_backend.h" |
29 #include "chrome/browser/history/typed_url_syncable_service.h" | 27 #include "chrome/browser/history/typed_url_syncable_service.h" |
30 #include "chrome/browser/history/typed_url_syncable_service.h" | |
31 #include "chrome/common/chrome_constants.h" | |
32 #include "chrome/common/importer/imported_favicon_usage.h" | 28 #include "chrome/common/importer/imported_favicon_usage.h" |
33 #include "chrome/common/url_constants.h" | |
34 #include "components/favicon_base/select_favicon_frames.h" | 29 #include "components/favicon_base/select_favicon_frames.h" |
35 #include "components/history/core/browser/download_constants.h" | 30 #include "components/history/core/browser/download_constants.h" |
36 #include "components/history/core/browser/download_row.h" | 31 #include "components/history/core/browser/download_row.h" |
37 #include "components/history/core/browser/history_backend_observer.h" | 32 #include "components/history/core/browser/history_backend_observer.h" |
38 #include "components/history/core/browser/history_client.h" | 33 #include "components/history/core/browser/history_client.h" |
39 #include "components/history/core/browser/history_constants.h" | 34 #include "components/history/core/browser/history_constants.h" |
40 #include "components/history/core/browser/history_database.h" | 35 #include "components/history/core/browser/history_database.h" |
41 #include "components/history/core/browser/history_database_params.h" | 36 #include "components/history/core/browser/history_database_params.h" |
42 #include "components/history/core/browser/history_db_task.h" | 37 #include "components/history/core/browser/history_db_task.h" |
43 #include "components/history/core/browser/keyword_search_term.h" | 38 #include "components/history/core/browser/keyword_search_term.h" |
44 #include "components/history/core/browser/page_usage_data.h" | 39 #include "components/history/core/browser/page_usage_data.h" |
45 #include "components/history/core/browser/visit_filter.h" | 40 #include "components/history/core/browser/visit_filter.h" |
46 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 41 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
47 #include "sql/error_delegate_util.h" | 42 #include "sql/error_delegate_util.h" |
48 #include "third_party/skia/include/core/SkBitmap.h" | 43 #include "third_party/skia/include/core/SkBitmap.h" |
49 #include "ui/gfx/codec/png_codec.h" | 44 #include "ui/gfx/codec/png_codec.h" |
50 #include "url/gurl.h" | 45 #include "url/gurl.h" |
| 46 #include "url/url_constants.h" |
51 | 47 |
52 #if defined(OS_ANDROID) | 48 #if defined(OS_ANDROID) |
53 #include "chrome/browser/history/android/android_provider_backend.h" | 49 #include "chrome/browser/history/android/android_provider_backend.h" |
54 #endif | 50 #endif |
55 | 51 |
56 using base::Time; | 52 using base::Time; |
57 using base::TimeDelta; | 53 using base::TimeDelta; |
58 using base::TimeTicks; | 54 using base::TimeTicks; |
59 | 55 |
60 /* The HistoryBackend consists of two components: | 56 /* The HistoryBackend consists of two components: |
(...skipping 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2693 info.url_id = visit.url_id; | 2689 info.url_id = visit.url_id; |
2694 info.time = visit.visit_time; | 2690 info.time = visit.visit_time; |
2695 info.transition = visit.transition; | 2691 info.transition = visit.transition; |
2696 // If we don't have a delegate yet during setup or shutdown, we will drop | 2692 // If we don't have a delegate yet during setup or shutdown, we will drop |
2697 // these notifications. | 2693 // these notifications. |
2698 if (delegate_) | 2694 if (delegate_) |
2699 delegate_->NotifyAddVisit(info); | 2695 delegate_->NotifyAddVisit(info); |
2700 } | 2696 } |
2701 | 2697 |
2702 } // namespace history | 2698 } // namespace history |
OLD | NEW |