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> |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 first_recorded_time_ = visit_info.visit_time; | 775 first_recorded_time_ = visit_info.visit_time; |
776 | 776 |
777 // Broadcast a notification of the visit. | 777 // Broadcast a notification of the visit. |
778 if (visit_id) { | 778 if (visit_id) { |
779 if (typed_url_syncable_service_.get()) | 779 if (typed_url_syncable_service_.get()) |
780 typed_url_syncable_service_->OnUrlVisited(transition, &url_info); | 780 typed_url_syncable_service_->OnUrlVisited(transition, &url_info); |
781 | 781 |
782 scoped_ptr<URLVisitedDetails> details(new URLVisitedDetails); | 782 scoped_ptr<URLVisitedDetails> details(new URLVisitedDetails); |
783 details->transition = transition; | 783 details->transition = transition; |
784 details->row = url_info; | 784 details->row = url_info; |
| 785 details->visit_time = time; |
785 // TODO(meelapshah) Disabled due to potential PageCycler regression. | 786 // TODO(meelapshah) Disabled due to potential PageCycler regression. |
786 // Re-enable this. | 787 // Re-enable this. |
787 // GetMostRecentRedirectsTo(url, &details->redirects); | 788 // GetMostRecentRedirectsTo(url, &details->redirects); |
788 BroadcastNotifications(chrome::NOTIFICATION_HISTORY_URL_VISITED, | 789 BroadcastNotifications(chrome::NOTIFICATION_HISTORY_URL_VISITED, |
789 details.PassAs<HistoryDetails>()); | 790 details.PassAs<HistoryDetails>()); |
790 } else { | 791 } else { |
791 VLOG(0) << "Failed to build visit insert statement: " | 792 VLOG(0) << "Failed to build visit insert statement: " |
792 << "url_id = " << url_id; | 793 << "url_id = " << url_id; |
793 } | 794 } |
794 | 795 |
(...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2948 int rank = kPageVisitStatsMaxTopSites; | 2949 int rank = kPageVisitStatsMaxTopSites; |
2949 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url); | 2950 std::map<GURL, int>::const_iterator it = most_visited_urls_map_.find(url); |
2950 if (it != most_visited_urls_map_.end()) | 2951 if (it != most_visited_urls_map_.end()) |
2951 rank = (*it).second; | 2952 rank = (*it).second; |
2952 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank", | 2953 UMA_HISTOGRAM_ENUMERATION("History.TopSitesVisitsByRank", |
2953 rank, kPageVisitStatsMaxTopSites + 1); | 2954 rank, kPageVisitStatsMaxTopSites + 1); |
2954 } | 2955 } |
2955 #endif | 2956 #endif |
2956 | 2957 |
2957 } // namespace history | 2958 } // namespace history |
OLD | NEW |