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

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

Issue 141733008: Use incognito split for ChromeVox and TTS in Guest mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comment Created 6 years, 10 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 | « webkit/browser/fileapi/file_system_context.h ('k') | no next file » | 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 "webkit/browser/fileapi/file_system_context.h" 5 #include "webkit/browser/fileapi/file_system_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 return CrackFileSystemURL(FileSystemURL(url)); 411 return CrackFileSystemURL(FileSystemURL(url));
412 } 412 }
413 413
414 FileSystemURL FileSystemContext::CreateCrackedFileSystemURL( 414 FileSystemURL FileSystemContext::CreateCrackedFileSystemURL(
415 const GURL& origin, 415 const GURL& origin,
416 FileSystemType type, 416 FileSystemType type,
417 const base::FilePath& path) const { 417 const base::FilePath& path) const {
418 return CrackFileSystemURL(FileSystemURL(origin, type, path)); 418 return CrackFileSystemURL(FileSystemURL(origin, type, path));
419 } 419 }
420 420
421 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) 421 #if defined(OS_CHROMEOS)
422 void FileSystemContext::EnableTemporaryFileSystemInIncognito() { 422 void FileSystemContext::EnableTemporaryFileSystemInIncognito() {
423 sandbox_backend_->set_enable_temporary_file_system_in_incognito(true); 423 sandbox_backend_->set_enable_temporary_file_system_in_incognito(true);
424 } 424 }
425 #endif 425 #endif
426 426
427 bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const { 427 bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const {
428 // We never support accessing files in isolated filesystems via an URL. 428 // We never support accessing files in isolated filesystems via an URL.
429 if (url.mount_type() == kFileSystemTypeIsolated) 429 if (url.mount_type() == kFileSystemTypeIsolated)
430 return false; 430 return false;
431 #if defined(OS_CHROMEOS) && defined(GOOGLE_CHROME_BUILD) 431 #if defined(OS_CHROMEOS)
432 if (url.type() == kFileSystemTypeTemporary && 432 if (url.type() == kFileSystemTypeTemporary &&
433 sandbox_backend_->enable_temporary_file_system_in_incognito()) { 433 sandbox_backend_->enable_temporary_file_system_in_incognito()) {
434 return true; 434 return true;
435 } 435 }
436 #endif 436 #endif
437 return !is_incognito_ || !FileSystemContext::IsSandboxFileSystem(url.type()); 437 return !is_incognito_ || !FileSystemContext::IsSandboxFileSystem(url.type());
438 } 438 }
439 439
440 void FileSystemContext::OpenPluginPrivateFileSystem( 440 void FileSystemContext::OpenPluginPrivateFileSystem(
441 const GURL& origin_url, 441 const GURL& origin_url,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 } else if (parent != child) { 564 } else if (parent != child) {
565 bool result = parent.AppendRelativePath(child, &path); 565 bool result = parent.AppendRelativePath(child, &path);
566 DCHECK(result); 566 DCHECK(result);
567 } 567 }
568 568
569 operation_runner()->GetMetadata( 569 operation_runner()->GetMetadata(
570 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); 570 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info));
571 } 571 }
572 572
573 } // namespace fileapi 573 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698