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_tab_helper.h" | 5 #include "chrome/browser/history/history_tab_helper.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "build/build_config.h" |
9 #include "chrome/browser/history/history_service_factory.h" | 10 #include "chrome/browser/history/history_service_factory.h" |
10 #include "chrome/browser/prerender/prerender_contents.h" | 11 #include "chrome/browser/prerender/prerender_contents.h" |
11 #include "chrome/browser/prerender/prerender_manager.h" | 12 #include "chrome/browser/prerender/prerender_manager.h" |
12 #include "chrome/browser/prerender/prerender_manager_factory.h" | 13 #include "chrome/browser/prerender/prerender_manager_factory.h" |
13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
14 #include "components/history/content/browser/history_context_helper.h" | 15 #include "components/history/content/browser/history_context_helper.h" |
15 #include "components/history/core/browser/history_service.h" | 16 #include "components/history/core/browser/history_service.h" |
16 #include "content/public/browser/navigation_details.h" | 17 #include "content/public/browser/navigation_details.h" |
17 #include "content/public/browser/navigation_entry.h" | 18 #include "content/public/browser/navigation_entry.h" |
18 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if (hs) { | 159 if (hs) { |
159 NavigationEntry* entry = tab->GetController().GetLastCommittedEntry(); | 160 NavigationEntry* entry = tab->GetController().GetLastCommittedEntry(); |
160 history::ContextID context_id = history::ContextIDForWebContents(tab); | 161 history::ContextID context_id = history::ContextIDForWebContents(tab); |
161 if (entry) { | 162 if (entry) { |
162 hs->UpdateWithPageEndTime(context_id, entry->GetUniqueID(), tab->GetURL(), | 163 hs->UpdateWithPageEndTime(context_id, entry->GetUniqueID(), tab->GetURL(), |
163 base::Time::Now()); | 164 base::Time::Now()); |
164 } | 165 } |
165 hs->ClearCachedDataForContextID(context_id); | 166 hs->ClearCachedDataForContextID(context_id); |
166 } | 167 } |
167 } | 168 } |
OLD | NEW |