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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6603034: Stop returning the true root path of each filesystem from openFileSystem.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | « base/platform_file.h ('k') | content/browser/file_system/file_system_dispatcher_host.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #include "content/common/result_codes.h" 97 #include "content/common/result_codes.h"
98 #include "content/common/view_messages.h" 98 #include "content/common/view_messages.h"
99 #include "grit/generated_resources.h" 99 #include "grit/generated_resources.h"
100 #include "ipc/ipc_logging.h" 100 #include "ipc/ipc_logging.h"
101 #include "ipc/ipc_platform_file.h" 101 #include "ipc/ipc_platform_file.h"
102 #include "ipc/ipc_switches.h" 102 #include "ipc/ipc_switches.h"
103 #include "media/base/media_switches.h" 103 #include "media/base/media_switches.h"
104 #include "ui/base/ui_base_switches.h" 104 #include "ui/base/ui_base_switches.h"
105 #include "ui/gfx/gl/gl_switches.h" 105 #include "ui/gfx/gl/gl_switches.h"
106 #include "webkit/fileapi/file_system_path_manager.h" 106 #include "webkit/fileapi/file_system_path_manager.h"
107 #include "webkit/fileapi/sandbox_mount_point_provider.h"
107 #include "webkit/glue/resource_type.h" 108 #include "webkit/glue/resource_type.h"
108 #include "webkit/plugins/plugin_switches.h" 109 #include "webkit/plugins/plugin_switches.h"
109 110
110 #if defined(OS_WIN) 111 #if defined(OS_WIN)
111 #include <objbase.h> 112 #include <objbase.h>
112 #include "content/common/section_util_win.h" 113 #include "content/common/section_util_win.h"
113 #endif 114 #endif
114 115
115 using WebKit::WebCache; 116 using WebKit::WebCache;
116 117
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 302
302 WebCacheManager::GetInstance()->Add(id()); 303 WebCacheManager::GetInstance()->Add(id());
303 ChildProcessSecurityPolicy::GetInstance()->Add(id()); 304 ChildProcessSecurityPolicy::GetInstance()->Add(id());
304 305
305 // Grant most file permissions to this renderer. 306 // Grant most file permissions to this renderer.
306 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and 307 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and
307 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API 308 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API
308 // requests them. 309 // requests them.
309 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 310 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
310 id(), profile->GetPath().Append( 311 id(), profile->GetPath().Append(
311 fileapi::FileSystemPathManager::kFileSystemDirectory), 312 fileapi::SandboxMountPointProvider::kFileSystemDirectory),
312 base::PLATFORM_FILE_OPEN | 313 base::PLATFORM_FILE_OPEN |
313 base::PLATFORM_FILE_CREATE | 314 base::PLATFORM_FILE_CREATE |
314 base::PLATFORM_FILE_OPEN_ALWAYS | 315 base::PLATFORM_FILE_OPEN_ALWAYS |
315 base::PLATFORM_FILE_CREATE_ALWAYS | 316 base::PLATFORM_FILE_CREATE_ALWAYS |
316 base::PLATFORM_FILE_READ | 317 base::PLATFORM_FILE_READ |
317 base::PLATFORM_FILE_WRITE | 318 base::PLATFORM_FILE_WRITE |
318 base::PLATFORM_FILE_EXCLUSIVE_READ | 319 base::PLATFORM_FILE_EXCLUSIVE_READ |
319 base::PLATFORM_FILE_EXCLUSIVE_WRITE | 320 base::PLATFORM_FILE_EXCLUSIVE_WRITE |
320 base::PLATFORM_FILE_ASYNC | 321 base::PLATFORM_FILE_ASYNC |
321 base::PLATFORM_FILE_TRUNCATE | 322 base::PLATFORM_FILE_TRUNCATE |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 IPC::PlatformFileForTransit file; 1307 IPC::PlatformFileForTransit file;
1307 #if defined(OS_POSIX) 1308 #if defined(OS_POSIX)
1308 file = base::FileDescriptor(model_file, false); 1309 file = base::FileDescriptor(model_file, false);
1309 #elif defined(OS_WIN) 1310 #elif defined(OS_WIN)
1310 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1311 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1311 false, DUPLICATE_SAME_ACCESS); 1312 false, DUPLICATE_SAME_ACCESS);
1312 #endif 1313 #endif
1313 Send(new ViewMsg_SetPhishingModel(file)); 1314 Send(new ViewMsg_SetPhishingModel(file));
1314 } 1315 }
1315 } 1316 }
OLDNEW
« no previous file with comments | « base/platform_file.h ('k') | content/browser/file_system/file_system_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698