OLD | NEW |
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/fileapi/sandbox_mount_point_provider.h" | 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 profile_path.Append(kNewFileSystemDirectory))), | 338 profile_path.Append(kNewFileSystemDirectory))), |
339 quota_observer_(new SandboxQuotaObserver( | 339 quota_observer_(new SandboxQuotaObserver( |
340 quota_manager_proxy, | 340 quota_manager_proxy, |
341 file_task_runner, | 341 file_task_runner, |
342 ALLOW_THIS_IN_INITIALIZER_LIST(this))), | 342 ALLOW_THIS_IN_INITIALIZER_LIST(this))), |
343 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 343 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
344 // Set quota observers. | 344 // Set quota observers. |
345 UpdateObserverList::Source update_observers_src; | 345 UpdateObserverList::Source update_observers_src; |
346 AccessObserverList::Source access_observers_src; | 346 AccessObserverList::Source access_observers_src; |
347 | 347 |
348 update_observers_src.AddObserver(quota_observer_.get(), file_task_runner_); | 348 update_observers_src.AddObserver( |
| 349 quota_observer_.get(), file_task_runner_.get()); |
349 access_observers_src.AddObserver(quota_observer_.get(), NULL); | 350 access_observers_src.AddObserver(quota_observer_.get(), NULL); |
350 | 351 |
351 update_observers_ = UpdateObserverList(update_observers_src); | 352 update_observers_ = UpdateObserverList(update_observers_src); |
352 access_observers_ = AccessObserverList(access_observers_src); | 353 access_observers_ = AccessObserverList(access_observers_src); |
353 syncable_update_observers_ = UpdateObserverList(update_observers_src); | 354 syncable_update_observers_ = UpdateObserverList(update_observers_src); |
354 } | 355 } |
355 | 356 |
356 SandboxMountPointProvider::~SandboxMountPointProvider() { | 357 SandboxMountPointProvider::~SandboxMountPointProvider() { |
357 if (!file_task_runner_->RunsTasksOnCurrentThread()) { | 358 if (!file_task_runner_->RunsTasksOnCurrentThread()) { |
358 ObfuscatedFileUtil* sandbox_file_util = sandbox_file_util_.release(); | 359 ObfuscatedFileUtil* sandbox_file_util = sandbox_file_util_.release(); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 i < file_system_options_.additional_allowed_schemes().size(); | 775 i < file_system_options_.additional_allowed_schemes().size(); |
775 ++i) { | 776 ++i) { |
776 if (url.SchemeIs( | 777 if (url.SchemeIs( |
777 file_system_options_.additional_allowed_schemes()[i].c_str())) | 778 file_system_options_.additional_allowed_schemes()[i].c_str())) |
778 return true; | 779 return true; |
779 } | 780 } |
780 return false; | 781 return false; |
781 } | 782 } |
782 | 783 |
783 } // namespace fileapi | 784 } // namespace fileapi |
OLD | NEW |