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

Unified Diff: chrome/browser/sessions/session_restore.cc

Issue 2798143004: Fix for URL opening code (Closed)
Patch Set: Fixed class name usage. Created 3 years, 6 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/sessions/session_restore.h ('k') | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 49b446873dcf51153daf3469ba46dd8e84370b6c..2818f7fe7e64ab24f50f5bc6b64e54eef9ba59d7 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -277,6 +277,10 @@ class SessionRestoreImpl : public content::NotificationObserver {
Profile* profile() { return profile_; }
+ void AddURLsToOpen(const std::vector<GURL>& urls) {
+ urls_to_open_.insert(urls_to_open_.end(), urls.begin(), urls.end());
+ }
+
private:
// Invoked when done with creating all the tabs/browsers.
//
@@ -849,5 +853,17 @@ SessionRestore::CallbackSubscription
}
// static
+void SessionRestore::AddURLsToOpen(const Profile* profile,
+ const std::vector<GURL>& urls) {
+ for (auto* session_restorer : *active_session_restorers) {
+ if (session_restorer->profile() == profile) {
+ session_restorer->AddURLsToOpen(urls);
+ return;
+ }
+ }
+ NOTREACHED() << "Failed to add urls to open for session restore";
+}
+
+// static
base::CallbackList<void(int)>*
SessionRestore::on_session_restored_callbacks_ = nullptr;
« no previous file with comments | « chrome/browser/sessions/session_restore.h ('k') | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698