OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/history/core/browser/typed_url_syncable_service.h" | 5 #include "components/history/core/browser/typed_url_syncable_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 |
8 #include <utility> | 9 #include <utility> |
9 | 10 |
10 #include "base/auto_reset.h" | 11 #include "base/auto_reset.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
13 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
14 #include "components/history/core/browser/history_backend.h" | 15 #include "components/history/core/browser/history_backend.h" |
| 16 #include "components/sync/protocol/sync.pb.h" |
| 17 #include "components/sync/protocol/typed_url_specifics.pb.h" |
15 #include "net/base/url_util.h" | 18 #include "net/base/url_util.h" |
16 #include "sync/protocol/sync.pb.h" | |
17 #include "sync/protocol/typed_url_specifics.pb.h" | |
18 | 19 |
19 namespace history { | 20 namespace history { |
20 | 21 |
21 namespace { | 22 namespace { |
22 | 23 |
23 // The server backend can't handle arbitrarily large node sizes, so to keep | 24 // The server backend can't handle arbitrarily large node sizes, so to keep |
24 // the size under control we limit the visit array. | 25 // the size under control we limit the visit array. |
25 static const int kMaxTypedUrlVisits = 100; | 26 static const int kMaxTypedUrlVisits = 100; |
26 | 27 |
27 // There's no limit on how many visits the history DB could have for a given | 28 // There's no limit on how many visits the history DB could have for a given |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 | 1085 |
1085 for (; new_index < new_visit_count; ++new_index) { | 1086 for (; new_index < new_visit_count; ++new_index) { |
1086 new_visits->push_back(history::VisitInfo( | 1087 new_visits->push_back(history::VisitInfo( |
1087 base::Time::FromInternalValue(sync_specifics.visits(new_index)), | 1088 base::Time::FromInternalValue(sync_specifics.visits(new_index)), |
1088 ui::PageTransitionFromInt( | 1089 ui::PageTransitionFromInt( |
1089 sync_specifics.visit_transitions(new_index)))); | 1090 sync_specifics.visit_transitions(new_index)))); |
1090 } | 1091 } |
1091 } | 1092 } |
1092 | 1093 |
1093 } // namespace history | 1094 } // namespace history |
OLD | NEW |