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

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

Issue 10917231: Revamp TabNavigation class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac 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 unified diff | Download patch | Annotate | Revision Log
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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 DCHECK(web_contents->GetController().NeedsReload()); 940 DCHECK(web_contents->GetController().NeedsReload());
941 941
942 // Set up the file access rights for the selected navigation entry. 942 // Set up the file access rights for the selected navigation entry.
943 const int id = web_contents->GetRenderProcessHost()->GetID(); 943 const int id = web_contents->GetRenderProcessHost()->GetID();
944 const int read_file_permissions = 944 const int read_file_permissions =
945 base::PLATFORM_FILE_OPEN | 945 base::PLATFORM_FILE_OPEN |
946 base::PLATFORM_FILE_READ | 946 base::PLATFORM_FILE_READ |
947 base::PLATFORM_FILE_EXCLUSIVE_READ | 947 base::PLATFORM_FILE_EXCLUSIVE_READ |
948 base::PLATFORM_FILE_ASYNC; 948 base::PLATFORM_FILE_ASYNC;
949 const std::string& state = 949 const std::string& state =
950 tab.navigations.at(selected_index).state(); 950 tab.navigations.at(selected_index).content_state();
951 const std::vector<FilePath>& file_paths = 951 const std::vector<FilePath>& file_paths =
952 webkit_glue::FilePathsFromHistoryState(state); 952 webkit_glue::FilePathsFromHistoryState(state);
953 for (std::vector<FilePath>::const_iterator file = file_paths.begin(); 953 for (std::vector<FilePath>::const_iterator file = file_paths.begin();
954 file != file_paths.end(); ++file) { 954 file != file_paths.end(); ++file) {
955 content::ChildProcessSecurityPolicy::GetInstance()-> 955 content::ChildProcessSecurityPolicy::GetInstance()->
956 GrantPermissionsForFile(id, *file, read_file_permissions); 956 GrantPermissionsForFile(id, *file, read_file_permissions);
957 } 957 }
958 958
959 if (schedule_load) 959 if (schedule_load)
960 tab_loader_->ScheduleLoad(&web_contents->GetController()); 960 tab_loader_->ScheduleLoad(&web_contents->GetController());
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 if (active_session_restorers == NULL) 1132 if (active_session_restorers == NULL)
1133 return false; 1133 return false;
1134 for (std::set<SessionRestoreImpl*>::const_iterator it = 1134 for (std::set<SessionRestoreImpl*>::const_iterator it =
1135 active_session_restorers->begin(); 1135 active_session_restorers->begin();
1136 it != active_session_restorers->end(); ++it) { 1136 it != active_session_restorers->end(); ++it) {
1137 if ((*it)->profile() == profile) 1137 if ((*it)->profile() == profile)
1138 return true; 1138 return true;
1139 } 1139 }
1140 return false; 1140 return false;
1141 } 1141 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/base_session_service.cc ('k') | chrome/browser/sessions/session_restore_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698