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

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

Issue 10449028: Revert 138444 - Always pass FileSystemContext to ObfuscatedFileUtil operations (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1151/src/
Patch Set: Created 8 years, 6 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/file_system_context.cc ('k') | webkit/fileapi/file_system_quota_util.h » ('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/file_system_quota_client.h" 5 #include "webkit/fileapi/file_system_quota_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 29 matching lines...) Expand all
40 file_system_context_ = quota_client_->file_system_context_; 40 file_system_context_ = quota_client_->file_system_context_;
41 } 41 }
42 42
43 protected: 43 protected:
44 virtual ~GetOriginUsageTask() {} 44 virtual ~GetOriginUsageTask() {}
45 45
46 // QuotaThreadTask: 46 // QuotaThreadTask:
47 virtual void RunOnTargetThread() OVERRIDE { 47 virtual void RunOnTargetThread() OVERRIDE {
48 FileSystemQuotaUtil* quota_util = file_system_context_->GetQuotaUtil(type_); 48 FileSystemQuotaUtil* quota_util = file_system_context_->GetQuotaUtil(type_);
49 if (quota_util) 49 if (quota_util)
50 fs_usage_ = quota_util->GetOriginUsageOnFileThread( 50 fs_usage_ = quota_util->GetOriginUsageOnFileThread(origin_url_, type_);
51 file_system_context_, origin_url_, type_);
52 } 51 }
53 52
54 virtual void Completed() OVERRIDE { 53 virtual void Completed() OVERRIDE {
55 quota_client_->DidGetOriginUsage(type_, origin_url_, fs_usage_); 54 quota_client_->DidGetOriginUsage(type_, origin_url_, fs_usage_);
56 } 55 }
57 56
58 FileSystemQuotaClient* quota_client_; 57 FileSystemQuotaClient* quota_client_;
59 scoped_refptr<FileSystemContext> file_system_context_; 58 scoped_refptr<FileSystemContext> file_system_context_;
60 GURL origin_url_; 59 GURL origin_url_;
61 FileSystemType type_; 60 FileSystemType type_;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 DCHECK(pending_origins_for_host_callbacks_.HasCallbacks(type_and_host)); 286 DCHECK(pending_origins_for_host_callbacks_.HasCallbacks(type_and_host));
288 pending_origins_for_host_callbacks_.Run(type_and_host, origins, 287 pending_origins_for_host_callbacks_.Run(type_and_host, origins,
289 FileSystemTypeToQuotaStorageType(type_and_host.first)); 288 FileSystemTypeToQuotaStorageType(type_and_host.first));
290 } 289 }
291 290
292 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const { 291 base::SequencedTaskRunner* FileSystemQuotaClient::file_task_runner() const {
293 return file_system_context_->file_task_runner(); 292 return file_system_context_->file_task_runner();
294 } 293 }
295 294
296 } // namespace fileapi 295 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context.cc ('k') | webkit/fileapi/file_system_quota_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698