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

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

Issue 451703006: Revert 284870 "Set the web content's initial size only if the ta..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after
1037 GetDOMStorageContext()->RecreateSessionStorage( 1037 GetDOMStorageContext()->RecreateSessionStorage(
1038 tab.session_storage_persistent_id); 1038 tab.session_storage_persistent_id);
1039 } 1039 }
1040 1040
1041 WebContents* web_contents = 1041 WebContents* web_contents =
1042 chrome::AddRestoredTab(browser, 1042 chrome::AddRestoredTab(browser,
1043 tab.navigations, 1043 tab.navigations,
1044 tab_index, 1044 tab_index,
1045 selected_index, 1045 selected_index,
1046 tab.extension_app_id, 1046 tab.extension_app_id,
1047 is_selected_tab, // select 1047 false, // select
1048 tab.pinned, 1048 tab.pinned,
1049 true, 1049 true,
1050 session_storage_namespace.get(), 1050 session_storage_namespace.get(),
1051 tab.user_agent_override); 1051 tab.user_agent_override);
1052 // Regression check: check that the tab didn't start loading right away. The 1052 // Regression check: check that the tab didn't start loading right away. The
1053 // focused tab will be loaded by Browser, and TabLoader will load the rest. 1053 // focused tab will be loaded by Browser, and TabLoader will load the rest.
1054 DCHECK(is_selected_tab || web_contents->GetController().NeedsReload()); 1054 DCHECK(web_contents->GetController().NeedsReload());
1055 1055
1056 // Set up the file access rights for the selected navigation entry. 1056 // Set up the file access rights for the selected navigation entry.
1057 const int id = web_contents->GetRenderProcessHost()->GetID(); 1057 const int id = web_contents->GetRenderProcessHost()->GetID();
1058 const content::PageState& page_state = 1058 const content::PageState& page_state =
1059 tab.navigations.at(selected_index).page_state(); 1059 tab.navigations.at(selected_index).page_state();
1060 const std::vector<base::FilePath>& file_paths = 1060 const std::vector<base::FilePath>& file_paths =
1061 page_state.GetReferencedFiles(); 1061 page_state.GetReferencedFiles();
1062 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin(); 1062 for (std::vector<base::FilePath>::const_iterator file = file_paths.begin();
1063 file != file_paths.end(); ++file) { 1063 file != file_paths.end(); ++file) {
1064 content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(id, 1064 content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(id,
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 if (!active_session_restorers) 1292 if (!active_session_restorers)
1293 return false; 1293 return false;
1294 for (std::set<SessionRestoreImpl*>::const_iterator it = 1294 for (std::set<SessionRestoreImpl*>::const_iterator it =
1295 active_session_restorers->begin(); 1295 active_session_restorers->begin();
1296 it != active_session_restorers->end(); ++it) { 1296 it != active_session_restorers->end(); ++it) {
1297 if ((*it)->synchronous()) 1297 if ((*it)->synchronous())
1298 return true; 1298 return true;
1299 } 1299 }
1300 return false; 1300 return false;
1301 } 1301 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698