| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 visited_link_updater_.reset(new VisitedLinkUpdater()); | 234 visited_link_updater_.reset(new VisitedLinkUpdater()); |
| 235 | 235 |
| 236 WebCacheManager::GetInstance()->Add(id()); | 236 WebCacheManager::GetInstance()->Add(id()); |
| 237 ChildProcessSecurityPolicy::GetInstance()->Add(id()); | 237 ChildProcessSecurityPolicy::GetInstance()->Add(id()); |
| 238 | 238 |
| 239 // Grant most file permissions to this renderer. | 239 // Grant most file permissions to this renderer. |
| 240 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and | 240 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and |
| 241 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API | 241 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API |
| 242 // requests them. | 242 // requests them. |
| 243 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( | 243 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( |
| 244 id(), profile->GetPath().Append( | 244 id(), |
| 245 fileapi::FileSystemPathManager::kFileSystemDirectory), | 245 fileapi::FileSystemPathManager::GetFileSystemCommonRootDirectory( |
| 246 profile->GetPath()), |
| 246 base::PLATFORM_FILE_OPEN | | 247 base::PLATFORM_FILE_OPEN | |
| 247 base::PLATFORM_FILE_CREATE | | 248 base::PLATFORM_FILE_CREATE | |
| 248 base::PLATFORM_FILE_OPEN_ALWAYS | | 249 base::PLATFORM_FILE_OPEN_ALWAYS | |
| 249 base::PLATFORM_FILE_CREATE_ALWAYS | | 250 base::PLATFORM_FILE_CREATE_ALWAYS | |
| 250 base::PLATFORM_FILE_READ | | 251 base::PLATFORM_FILE_READ | |
| 251 base::PLATFORM_FILE_WRITE | | 252 base::PLATFORM_FILE_WRITE | |
| 252 base::PLATFORM_FILE_EXCLUSIVE_READ | | 253 base::PLATFORM_FILE_EXCLUSIVE_READ | |
| 253 base::PLATFORM_FILE_EXCLUSIVE_WRITE | | 254 base::PLATFORM_FILE_EXCLUSIVE_WRITE | |
| 254 base::PLATFORM_FILE_ASYNC | | 255 base::PLATFORM_FILE_ASYNC | |
| 255 base::PLATFORM_FILE_TRUNCATE | | 256 base::PLATFORM_FILE_TRUNCATE | |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 IPC::InvalidPlatformFileForTransit(), | 1172 IPC::InvalidPlatformFileForTransit(), |
| 1172 std::vector<std::string>(), | 1173 std::vector<std::string>(), |
| 1173 std::string(), | 1174 std::string(), |
| 1174 false)); | 1175 false)); |
| 1175 } | 1176 } |
| 1176 } | 1177 } |
| 1177 | 1178 |
| 1178 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { | 1179 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { |
| 1179 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); | 1180 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); |
| 1180 } | 1181 } |
| OLD | NEW |