Chromium Code Reviews| Index: chrome/browser/renderer_host/resource_message_filter.cc |
| =================================================================== |
| --- chrome/browser/renderer_host/resource_message_filter.cc (revision 60512) |
| +++ chrome/browser/renderer_host/resource_message_filter.cc (working copy) |
| @@ -1712,6 +1712,19 @@ |
| return; |
| } |
| + // TODO(dumi): update this check once we have a security attribute |
| + // that allows renderers to modify files. |
| + int allowed_flags = |
| + base::PLATFORM_FILE_OPEN | |
| + base::PLATFORM_FILE_READ | |
| + base::PLATFORM_FILE_EXCLUSIVE_READ | |
| + base::PLATFORM_FILE_ASYNC; |
| + if (flags & ~allowed_flags) { |
|
darin (slow to review)
2010/09/25 04:45:19
how about adding a DLOG(ERROR) here?
dumi
2010/09/27 18:58:51
done. added DLOG(ERROR) << "Bad flags in ViewMsgHo
|
| + BrowserRenderProcessHost::BadMessageTerminateProcess( |
| + ViewHostMsg_AsyncOpenFile::ID, handle()); |
| + return; |
| + } |
| + |
| ChromeThread::PostTask( |
| ChromeThread::FILE, FROM_HERE, NewRunnableMethod( |
| this, &ResourceMessageFilter::AsyncOpenFileOnFileThread, |