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

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

Issue 5754002: Moving away from shell api to support long path names on windows for filesystem. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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) 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 visited_link_updater_.reset(new VisitedLinkUpdater()); 279 visited_link_updater_.reset(new VisitedLinkUpdater());
280 280
281 WebCacheManager::GetInstance()->Add(id()); 281 WebCacheManager::GetInstance()->Add(id());
282 ChildProcessSecurityPolicy::GetInstance()->Add(id()); 282 ChildProcessSecurityPolicy::GetInstance()->Add(id());
283 283
284 // Grant most file permissions to this renderer. 284 // Grant most file permissions to this renderer.
285 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and 285 // PLATFORM_FILE_TEMPORARY, PLATFORM_FILE_HIDDEN and
286 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API 286 // PLATFORM_FILE_DELETE_ON_CLOSE are not granted, because no existing API
287 // requests them. 287 // requests them.
288 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile( 288 ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
289 id(), profile->GetPath().Append( 289 id(),
290 fileapi::FileSystemPathManager::kFileSystemDirectory), 290 fileapi::FileSystemPathManager::GetFileSystemCommonRootDirectory(
291 profile->GetPath()),
291 base::PLATFORM_FILE_OPEN | 292 base::PLATFORM_FILE_OPEN |
292 base::PLATFORM_FILE_CREATE | 293 base::PLATFORM_FILE_CREATE |
293 base::PLATFORM_FILE_OPEN_ALWAYS | 294 base::PLATFORM_FILE_OPEN_ALWAYS |
294 base::PLATFORM_FILE_CREATE_ALWAYS | 295 base::PLATFORM_FILE_CREATE_ALWAYS |
295 base::PLATFORM_FILE_READ | 296 base::PLATFORM_FILE_READ |
296 base::PLATFORM_FILE_WRITE | 297 base::PLATFORM_FILE_WRITE |
297 base::PLATFORM_FILE_EXCLUSIVE_READ | 298 base::PLATFORM_FILE_EXCLUSIVE_READ |
298 base::PLATFORM_FILE_EXCLUSIVE_WRITE | 299 base::PLATFORM_FILE_EXCLUSIVE_WRITE |
299 base::PLATFORM_FILE_ASYNC | 300 base::PLATFORM_FILE_ASYNC |
300 base::PLATFORM_FILE_TRUNCATE | 301 base::PLATFORM_FILE_TRUNCATE |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 IPC::PlatformFileForTransit file; 1299 IPC::PlatformFileForTransit file;
1299 #if defined(OS_POSIX) 1300 #if defined(OS_POSIX)
1300 file = base::FileDescriptor(model_file, false); 1301 file = base::FileDescriptor(model_file, false);
1301 #elif defined(OS_WIN) 1302 #elif defined(OS_WIN)
1302 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1303 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1303 false, DUPLICATE_SAME_ACCESS); 1304 false, DUPLICATE_SAME_ACCESS);
1304 #endif 1305 #endif
1305 Send(new ViewMsg_SetPhishingModel(file)); 1306 Send(new ViewMsg_SetPhishingModel(file));
1306 } 1307 }
1307 } 1308 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698