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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
OLDNEW
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 "chrome/browser/history/history_service.h" 9 #include "chrome/browser/history/history_service.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 void HistoryTabHelper::UpdateHistoryForNavigation( 46 void HistoryTabHelper::UpdateHistoryForNavigation(
47 const history::HistoryAddPageArgs& add_page_args) { 47 const history::HistoryAddPageArgs& add_page_args) {
48 HistoryService* hs = GetHistoryService(); 48 HistoryService* hs = GetHistoryService();
49 if (hs) 49 if (hs)
50 GetHistoryService()->AddPage(add_page_args); 50 GetHistoryService()->AddPage(add_page_args);
51 } 51 }
52 52
53 void HistoryTabHelper::UpdateHistoryPageTitle(const NavigationEntry& entry) { 53 void HistoryTabHelper::UpdateHistoryPageTitle(const NavigationEntry& entry) {
54 HistoryService* hs = GetHistoryService(); 54 HistoryService* hs = GetHistoryService();
55 if (hs) 55 if (hs)
56 hs->SetPageTitle(entry.GetVirtualURL(), entry.GetTitleForDisplay("")); 56 hs->SetPageTitle(entry.GetVirtualURL(),
57 entry.GetTitleForDisplay(std::string()));
57 } 58 }
58 59
59 history::HistoryAddPageArgs 60 history::HistoryAddPageArgs
60 HistoryTabHelper::CreateHistoryAddPageArgs( 61 HistoryTabHelper::CreateHistoryAddPageArgs(
61 const GURL& virtual_url, 62 const GURL& virtual_url,
62 base::Time timestamp, 63 base::Time timestamp,
63 bool did_replace_entry, 64 bool did_replace_entry,
64 const content::FrameNavigateParams& params) { 65 const content::FrameNavigateParams& params) {
65 history::HistoryAddPageArgs add_page_args( 66 history::HistoryAddPageArgs add_page_args(
66 params.url, timestamp, web_contents(), params.page_id, 67 params.url, timestamp, web_contents(), params.page_id,
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 HistoryService* hs = 206 HistoryService* hs =
206 HistoryServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS); 207 HistoryServiceFactory::GetForProfile(profile, Profile::IMPLICIT_ACCESS);
207 if (hs) { 208 if (hs) {
208 NavigationEntry* entry = tab->GetController().GetLastCommittedEntry(); 209 NavigationEntry* entry = tab->GetController().GetLastCommittedEntry();
209 if (entry) { 210 if (entry) {
210 hs->UpdateWithPageEndTime(tab, entry->GetPageID(), tab->GetURL(), 211 hs->UpdateWithPageEndTime(tab, entry->GetPageID(), tab->GetURL(),
211 base::Time::Now()); 212 base::Time::Now());
212 } 213 }
213 } 214 }
214 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/history/history_querying_unittest.cc ('k') | chrome/browser/history/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698