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

Side by Side Diff: webkit/fileapi/sandbox_mount_point_provider.cc

Issue 14307012: webkit: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/fileapi/sandbox_file_stream_writer.cc ('k') | webkit/fileapi/sandbox_quota_observer.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 "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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)), 155 file_system_usage_cache_(new FileSystemUsageCache(file_task_runner)),
156 quota_observer_(new SandboxQuotaObserver( 156 quota_observer_(new SandboxQuotaObserver(
157 quota_manager_proxy, 157 quota_manager_proxy,
158 file_task_runner, 158 file_task_runner,
159 sandbox_sync_file_util(), 159 sandbox_sync_file_util(),
160 file_system_usage_cache_.get())), 160 file_system_usage_cache_.get())),
161 enable_usage_tracking_( 161 enable_usage_tracking_(
162 !CommandLine::ForCurrentProcess()->HasSwitch( 162 !CommandLine::ForCurrentProcess()->HasSwitch(
163 kDisableUsageTracking)), 163 kDisableUsageTracking)),
164 special_storage_policy_(special_storage_policy), 164 special_storage_policy_(special_storage_policy),
165 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 165 weak_factory_(this) {
166 // Set quota observers. 166 // Set quota observers.
167 UpdateObserverList::Source update_observers_src; 167 UpdateObserverList::Source update_observers_src;
168 AccessObserverList::Source access_observers_src; 168 AccessObserverList::Source access_observers_src;
169 169
170 if (enable_usage_tracking_) { 170 if (enable_usage_tracking_) {
171 update_observers_src.AddObserver(quota_observer_.get(), file_task_runner_); 171 update_observers_src.AddObserver(quota_observer_.get(), file_task_runner_);
172 access_observers_src.AddObserver(quota_observer_.get(), NULL); 172 access_observers_src.AddObserver(quota_observer_.get(), NULL);
173 } 173 }
174 174
175 update_observers_ = UpdateObserverList(update_observers_src); 175 update_observers_ = UpdateObserverList(update_observers_src);
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 while (!(file_path_each = enumerator->Next()).empty()) { 685 while (!(file_path_each = enumerator->Next()).empty()) {
686 usage += enumerator->Size(); 686 usage += enumerator->Size();
687 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each); 687 usage += ObfuscatedFileUtil::ComputeFilePathCost(file_path_each);
688 } 688 }
689 689
690 return usage; 690 return usage;
691 } 691 }
692 692
693 } // namespace fileapi 693 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_file_stream_writer.cc ('k') | webkit/fileapi/sandbox_quota_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698