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

Side by Side Diff: webkit/browser/fileapi/file_system_context.h

Issue 23494028: Do not return FileSystem contents if the profile is in incognito mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | webkit/browser/fileapi/file_system_context.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 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) 221 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD)
222 // Used only on ChromeOS for now. 222 // Used only on ChromeOS for now.
223 void EnableTemporaryFileSystemInIncognito(); 223 void EnableTemporaryFileSystemInIncognito();
224 #endif 224 #endif
225 225
226 SandboxFileSystemBackendDelegate* sandbox_delegate() { 226 SandboxFileSystemBackendDelegate* sandbox_delegate() {
227 return sandbox_delegate_.get(); 227 return sandbox_delegate_.get();
228 } 228 }
229 229
230 // Returns true if the requested url is ok to be served.
231 // (E.g. this returns false if the context is created for incognito mode)
232 bool CanServeURLRequest(const FileSystemURL& url) const;
233
230 private: 234 private:
231 typedef std::map<FileSystemType, FileSystemBackend*> 235 typedef std::map<FileSystemType, FileSystemBackend*>
232 FileSystemBackendMap; 236 FileSystemBackendMap;
233 237
234 // For CreateFileSystemOperation. 238 // For CreateFileSystemOperation.
235 friend class FileSystemOperationRunner; 239 friend class FileSystemOperationRunner;
236 240
237 // For sandbox_backend(). 241 // For sandbox_backend().
238 friend class SandboxFileSystemTestHelper; 242 friend class SandboxFileSystemTestHelper;
239 243
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // external mount points). 305 // external mount points).
302 scoped_refptr<ExternalMountPoints> external_mount_points_; 306 scoped_refptr<ExternalMountPoints> external_mount_points_;
303 307
304 // MountPoints used to crack FileSystemURLs. The MountPoints are ordered 308 // MountPoints used to crack FileSystemURLs. The MountPoints are ordered
305 // in order they should try to crack a FileSystemURL. 309 // in order they should try to crack a FileSystemURL.
306 std::vector<MountPoints*> url_crackers_; 310 std::vector<MountPoints*> url_crackers_;
307 311
308 // The base path of the storage partition for this context. 312 // The base path of the storage partition for this context.
309 const base::FilePath partition_path_; 313 const base::FilePath partition_path_;
310 314
315 bool is_incognito_;
316
311 scoped_ptr<FileSystemOperationRunner> operation_runner_; 317 scoped_ptr<FileSystemOperationRunner> operation_runner_;
312 318
313 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext); 319 DISALLOW_IMPLICIT_CONSTRUCTORS(FileSystemContext);
314 }; 320 };
315 321
316 struct DefaultContextDeleter { 322 struct DefaultContextDeleter {
317 static void Destruct(const FileSystemContext* context) { 323 static void Destruct(const FileSystemContext* context) {
318 context->DeleteOnCorrectThread(); 324 context->DeleteOnCorrectThread();
319 } 325 }
320 }; 326 };
321 327
322 } // namespace fileapi 328 } // namespace fileapi
323 329
324 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_ 330 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/browser/fileapi/file_system_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698