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

Unified Diff: chrome/browser/history/history.cc

Issue 10963018: Rework arguments of HistoryService::AddPage() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows compile Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history.cc
diff --git a/chrome/browser/history/history.cc b/chrome/browser/history/history.cc
index b28b2c4c17d495c557820b67e6b0426bc3e4e767..d5957173cc94376692aa527d50b9da244686ba42 100644
--- a/chrome/browser/history/history.cc
+++ b/chrome/browser/history/history.cc
@@ -344,31 +344,28 @@ void HistoryService::SetOnBackendDestroyTask(const base::Closure& task) {
}
void HistoryService::AddPage(const GURL& url,
+ Time time,
const void* id_scope,
int32 page_id,
const GURL& referrer,
- content::PageTransition transition,
const history::RedirectList& redirects,
+ content::PageTransition transition,
history::VisitSource visit_source,
bool did_replace_entry) {
- AddPage(url, Time::Now(), id_scope, page_id, referrer, transition, redirects,
- visit_source, did_replace_entry);
+ AddPage(
+ history::HistoryAddPageArgs(url, time, id_scope, page_id, referrer,
+ redirects, transition, visit_source,
+ did_replace_entry));
}
void HistoryService::AddPage(const GURL& url,
- Time time,
- const void* id_scope,
- int32 page_id,
- const GURL& referrer,
- content::PageTransition transition,
- const history::RedirectList& redirects,
- history::VisitSource visit_source,
- bool did_replace_entry) {
- scoped_refptr<history::HistoryAddPageArgs> request(
- new history::HistoryAddPageArgs(url, time, id_scope, page_id, referrer,
- redirects, transition, visit_source,
- did_replace_entry));
- AddPage(*request);
+ base::Time time,
+ history::VisitSource visit_source) {
+ AddPage(
+ history::HistoryAddPageArgs(url, time, NULL, 0, GURL(),
+ history::RedirectList(),
+ content::PAGE_TRANSITION_LINK,
+ visit_source, false));
}
void HistoryService::AddPage(const history::HistoryAddPageArgs& add_page_args) {
@@ -398,9 +395,7 @@ void HistoryService::AddPage(const history::HistoryAddPageArgs& add_page_args) {
}
}
- ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::AddPage,
- scoped_refptr<history::HistoryAddPageArgs>(
- add_page_args.Clone()));
+ ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::AddPage, add_page_args);
}
void HistoryService::AddPageNoVisitForBookmark(const GURL& url,
« no previous file with comments | « chrome/browser/history/history.h ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698