Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/browser/history/history_tab_helper.cc

Issue 7453053: history: use display title, not page title (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/history/history.h" 7 #include "chrome/browser/history/history.h"
8 #include "chrome/browser/history/top_sites.h" 8 #include "chrome/browser/history/top_sites.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 18 matching lines...) Expand all
29 void HistoryTabHelper::UpdateHistoryForNavigation( 29 void HistoryTabHelper::UpdateHistoryForNavigation(
30 scoped_refptr<history::HistoryAddPageArgs> add_page_args) { 30 scoped_refptr<history::HistoryAddPageArgs> add_page_args) {
31 HistoryService* hs = GetHistoryService(); 31 HistoryService* hs = GetHistoryService();
32 if (hs) 32 if (hs)
33 GetHistoryService()->AddPage(*add_page_args); 33 GetHistoryService()->AddPage(*add_page_args);
34 } 34 }
35 35
36 void HistoryTabHelper::UpdateHistoryPageTitle(const NavigationEntry& entry) { 36 void HistoryTabHelper::UpdateHistoryPageTitle(const NavigationEntry& entry) {
37 HistoryService* hs = GetHistoryService(); 37 HistoryService* hs = GetHistoryService();
38 if (hs) 38 if (hs)
39 hs->SetPageTitle(entry.virtual_url(), entry.title()); 39 hs->SetPageTitle(entry.virtual_url(), entry.GetTitleForDisplay(""));
40 } 40 }
41 41
42 scoped_refptr<history::HistoryAddPageArgs> 42 scoped_refptr<history::HistoryAddPageArgs>
43 HistoryTabHelper::CreateHistoryAddPageArgs( 43 HistoryTabHelper::CreateHistoryAddPageArgs(
44 const GURL& virtual_url, 44 const GURL& virtual_url,
45 const content::LoadCommittedDetails& details, 45 const content::LoadCommittedDetails& details,
46 const ViewHostMsg_FrameNavigate_Params& params) { 46 const ViewHostMsg_FrameNavigate_Params& params) {
47 scoped_refptr<history::HistoryAddPageArgs> add_page_args( 47 scoped_refptr<history::HistoryAddPageArgs> add_page_args(
48 new history::HistoryAddPageArgs( 48 new history::HistoryAddPageArgs(
49 params.url, base::Time::Now(), tab_contents(), params.page_id, 49 params.url, base::Time::Now(), tab_contents(), params.page_id,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 156
157 HistoryService* HistoryTabHelper::GetHistoryService() { 157 HistoryService* HistoryTabHelper::GetHistoryService() {
158 Profile* profile = 158 Profile* profile =
159 Profile::FromBrowserContext(tab_contents()->browser_context()); 159 Profile::FromBrowserContext(tab_contents()->browser_context());
160 if (profile->IsOffTheRecord()) 160 if (profile->IsOffTheRecord())
161 return NULL; 161 return NULL;
162 162
163 return profile->GetHistoryService(Profile::IMPLICIT_ACCESS); 163 return profile->GetHistoryService(Profile::IMPLICIT_ACCESS);
164 } 164 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/tab_contents/navigation_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698