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

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

Issue 10197007: Change webkit/{fileapi,quota} code to use TaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 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/file_system_quota_client.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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool isDirectory; 59 bool isDirectory;
60 const char* name; 60 const char* name;
61 int64 size; 61 int64 size;
62 const char* origin_url; 62 const char* origin_url;
63 quota::StorageType type; 63 quota::StorageType type;
64 }; 64 };
65 65
66 protected: 66 protected:
67 FileSystemQuotaClient* NewQuotaClient(bool is_incognito) { 67 FileSystemQuotaClient* NewQuotaClient(bool is_incognito) {
68 return new FileSystemQuotaClient( 68 return new FileSystemQuotaClient(
69 base::MessageLoopProxy::current(),
70 file_system_context_, is_incognito); 69 file_system_context_, is_incognito);
71 } 70 }
72 71
73 void GetOriginUsageAsync(FileSystemQuotaClient* quota_client, 72 void GetOriginUsageAsync(FileSystemQuotaClient* quota_client,
74 const std::string& origin_url, 73 const std::string& origin_url,
75 quota::StorageType type) { 74 quota::StorageType type) {
76 quota_client->GetOriginUsage( 75 quota_client->GetOriginUsage(
77 GURL(origin_url), type, 76 GURL(origin_url), type,
78 base::Bind(&FileSystemQuotaClientTest::OnGetUsage, 77 base::Bind(&FileSystemQuotaClientTest::OnGetUsage,
79 weak_factory_.GetWeakPtr())); 78 weak_factory_.GetWeakPtr()));
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 GetOriginUsage(quota_client.get(), 579 GetOriginUsage(quota_client.get(),
581 "https://bar.com/", 580 "https://bar.com/",
582 kPersistent)); 581 kPersistent));
583 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https, 582 EXPECT_EQ(64 + file_paths_cost_temporary_bar_https,
584 GetOriginUsage(quota_client.get(), 583 GetOriginUsage(quota_client.get(),
585 "https://bar.com/", 584 "https://bar.com/",
586 kTemporary)); 585 kTemporary));
587 } 586 }
588 587
589 } // namespace fileapi 588 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_quota_client.cc ('k') | webkit/fileapi/file_system_quota_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698