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

Side by Side Diff: content/browser/fileapi/browser_file_system_helper.cc

Issue 22893003: Discard FileAPI pending operations on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « no previous file | content/browser/storage_partition_impl.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/fileapi/browser_file_system_helper.h" 5 #include "content/browser/fileapi/browser_file_system_helper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } // namespace 48 } // namespace
49 49
50 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext( 50 scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext(
51 BrowserContext* browser_context, 51 BrowserContext* browser_context,
52 const base::FilePath& profile_path, 52 const base::FilePath& profile_path,
53 bool is_incognito, 53 bool is_incognito,
54 quota::QuotaManagerProxy* quota_manager_proxy) { 54 quota::QuotaManagerProxy* quota_manager_proxy) {
55 55
56 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool(); 56 base::SequencedWorkerPool* pool = content::BrowserThread::GetBlockingPool();
57 scoped_refptr<base::SequencedTaskRunner> file_task_runner = 57 scoped_refptr<base::SequencedTaskRunner> file_task_runner =
58 pool->GetSequencedTaskRunner(pool->GetNamedSequenceToken("FileAPI")); 58 pool->GetSequencedTaskRunnerWithShutdownBehavior(
59 pool->GetNamedSequenceToken("FileAPI"),
60 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN);
59 61
60 // Setting up additional filesystem backends. 62 // Setting up additional filesystem backends.
61 ScopedVector<fileapi::FileSystemBackend> additional_backends; 63 ScopedVector<fileapi::FileSystemBackend> additional_backends;
62 GetContentClient()->browser()->GetAdditionalFileSystemBackends( 64 GetContentClient()->browser()->GetAdditionalFileSystemBackends(
63 browser_context, 65 browser_context,
64 profile_path, 66 profile_path,
65 &additional_backends); 67 &additional_backends);
66 68
67 scoped_refptr<fileapi::FileSystemContext> file_system_context = 69 scoped_refptr<fileapi::FileSystemContext> file_system_context =
68 new fileapi::FileSystemContext( 70 new fileapi::FileSystemContext(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 context->operation_runner()->SyncGetPlatformPath(url, platform_path); 142 context->operation_runner()->SyncGetPlatformPath(url, platform_path);
141 143
142 // The path is to be attached to URLLoader so we grant read permission 144 // The path is to be attached to URLLoader so we grant read permission
143 // for the file. (We need to check first because a parent directory may 145 // for the file. (We need to check first because a parent directory may
144 // already have the permissions and we don't need to grant it to the file.) 146 // already have the permissions and we don't need to grant it to the file.)
145 if (!policy->CanReadFile(process_id, *platform_path)) 147 if (!policy->CanReadFile(process_id, *platform_path))
146 policy->GrantReadFile(process_id, *platform_path); 148 policy->GrantReadFile(process_id, *platform_path);
147 } 149 }
148 150
149 } // namespace content 151 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698