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

Unified Diff: chrome/browser/prerender/prerender_contents.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
Index: chrome/browser/prerender/prerender_contents.cc
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 54ae9d016d323cdea5852991d649319fc19d92bc..15d769c1a7aa4d0daea694b31ad8109d22861c33 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -23,11 +23,11 @@
#include "chrome/common/icon_messages.h"
#include "chrome/common/prerender_messages.h"
#include "chrome/common/url_constants.h"
-#include "content/public/browser/resource_request_details.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/resource_request_details.h"
#include "content/public/browser/session_storage_namespace.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
@@ -107,8 +107,7 @@ class PrerenderContents::TabContentsDelegateImpl
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
content::NavigationType navigation_type) OVERRIDE {
- add_page_vector_.push_back(
- scoped_refptr<history::HistoryAddPageArgs>(add_page_args.Clone()));
+ add_page_vector_.push_back(add_page_args);
return false;
}
@@ -175,12 +174,11 @@ class PrerenderContents::TabContentsDelegateImpl
void CommitHistory(TabContents* tab) {
for (size_t i = 0; i < add_page_vector_.size(); ++i)
tab->history_tab_helper()->UpdateHistoryForNavigation(
- add_page_vector_[i].get());
+ add_page_vector_[i]);
}
private:
- typedef std::vector<scoped_refptr<history::HistoryAddPageArgs> >
- AddPageVector;
+ typedef std::vector<history::HistoryAddPageArgs> AddPageVector;
// Caches pages to be added to the history.
AddPageVector add_page_vector_;
« no previous file with comments | « chrome/browser/instant/instant_loader.cc ('k') | chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698