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

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

Issue 2798143004: Fix for URL opening code (Closed)
Patch Set: Removed vlog, that wasn't needed Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 7598e0f746e8d59a1dcacca4e0100dd99e5a7672..e9e45cb2803ae069c34f91843aa8219df0e6da5d 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -276,6 +276,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.
//
@@ -848,5 +852,19 @@ SessionRestore::CallbackSubscription
}
// static
+void SessionRestore::AddURLsToOpen(const Profile* profile,
+ const std::vector<GURL> urls) {
+ for (std::set<SessionRestoreImpl*>::const_iterator it =
+ active_session_restorers->begin();
+ it != active_session_restorers->end(); ++it) {
+ if ((*it)->profile() == profile) {
+ (*it)->AddURLsToOpen(urls);
+ return;
+ }
+ }
+ DCHECK(0) << "Failed to add urls to open for session restore";
sky 2017/04/28 17:34:58 NOTREACHED
eugenebng 2017/05/03 16:05:30 Done.
+}
+
+// static
base::CallbackList<void(int)>*
SessionRestore::on_session_restored_callbacks_ = nullptr;
« chrome/browser/sessions/session_restore.h ('K') | « chrome/browser/sessions/session_restore.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698