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

Side by Side Diff: chrome/browser/sessions/session_restore.cc

Issue 10600009: Support partitioning of storage contexts based on render_id. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comments Created 8 years, 5 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
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/sessions/session_restore.h" 5 #include "chrome/browser/sessions/session_restore.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 0, 870 0,
871 std::min(selected_index, 871 std::min(selected_index,
872 static_cast<int>(tab.navigations.size() - 1))); 872 static_cast<int>(tab.navigations.size() - 1)));
873 873
874 RecordAppLaunchForTab(browser, tab, selected_index); 874 RecordAppLaunchForTab(browser, tab, selected_index);
875 875
876 // Associate sessionStorage (if any) to the restored tab. 876 // Associate sessionStorage (if any) to the restored tab.
877 scoped_refptr<content::SessionStorageNamespace> session_storage_namespace; 877 scoped_refptr<content::SessionStorageNamespace> session_storage_namespace;
878 if (!tab.session_storage_persistent_id.empty()) { 878 if (!tab.session_storage_persistent_id.empty()) {
879 session_storage_namespace = 879 session_storage_namespace =
880 content::BrowserContext::GetDOMStorageContext(profile_)-> 880 content::BrowserContext::GetDefaultDOMStorageContext(profile_)->
881 RecreateSessionStorage(tab.session_storage_persistent_id); 881 RecreateSessionStorage(tab.session_storage_persistent_id);
882 } 882 }
883 883
884 WebContents* web_contents = 884 WebContents* web_contents =
885 browser->AddRestoredTab(tab.navigations, 885 browser->AddRestoredTab(tab.navigations,
886 tab_index, 886 tab_index,
887 selected_index, 887 selected_index,
888 tab.extension_app_id, 888 tab.extension_app_id,
889 false, // select 889 false, // select
890 tab.pinned, 890 tab.pinned,
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 if (active_session_restorers == NULL) 1087 if (active_session_restorers == NULL)
1088 return false; 1088 return false;
1089 for (std::set<SessionRestoreImpl*>::const_iterator it = 1089 for (std::set<SessionRestoreImpl*>::const_iterator it =
1090 active_session_restorers->begin(); 1090 active_session_restorers->begin();
1091 it != active_session_restorers->end(); ++it) { 1091 it != active_session_restorers->end(); ++it) {
1092 if ((*it)->profile() == profile) 1092 if ((*it)->profile() == profile)
1093 return true; 1093 return true;
1094 } 1094 }
1095 return false; 1095 return false;
1096 } 1096 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698