Code: void FileAPIMessageFilter::OnCreateSnapshotFile(
    int request_id, const GURL& blob_url, const GURL& path) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
   FileSystemURL url(path);
   base::Callback<void(const FilePath&)> register_file_callback =
       base::Bind(&FileAPIMessageFilter::RegisterFileAsBlob,
                 this, blob_url, url.path());
 
   FileSystemOperation* operation = GetNewOperation(url, request_id);
   if (!operation)
    return;
  operation->CreateSnapshotFile(
      url,
      base::Bind(&FileAPIMessageFilter::DidCreateSnapshot,
                 this, request_id, register_file_callback));
}

Vulnerability Type: Bypass 
CWE ID: CWE-264
Summary: Google Chrome before 24.0.1312.52 does not properly maintain database metadata, which allows remote attackers to bypass intended file-access restrictions via unspecified vectors.
Commit Message: File permission fix: now we selectively grant read permission for Sandboxed files

We also need to check the read permission and call GrantReadFile() for
sandboxed files for CreateSnapshotFile().

BUG=162114
TEST=manual

Review URL: https://codereview.chromium.org/11280231

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170181 0039d316-1c4b-4281-b951-d872f2087c98