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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_browsertest.cc

Issue 10834264: Add BrowserContext::GetQuotaManagerForRenderProcess for the isolated app feature. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
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/command_line.h" 6 #include "base/command_line.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 class IndexedDBBrowserTestWithLowQuota : public IndexedDBBrowserTest { 133 class IndexedDBBrowserTestWithLowQuota : public IndexedDBBrowserTest {
134 public: 134 public:
135 virtual void SetUpOnMainThread() { 135 virtual void SetUpOnMainThread() {
136 const int kInitialQuotaKilobytes = 5000; 136 const int kInitialQuotaKilobytes = 5000;
137 const int kTemporaryStorageQuotaMaxSize = kInitialQuotaKilobytes 137 const int kTemporaryStorageQuotaMaxSize = kInitialQuotaKilobytes
138 * 1024 * QuotaManager::kPerHostTemporaryPortion; 138 * 1024 * QuotaManager::kPerHostTemporaryPortion;
139 SetTempQuota( 139 SetTempQuota(
140 kTemporaryStorageQuotaMaxSize, 140 kTemporaryStorageQuotaMaxSize,
141 BrowserContext::GetQuotaManager( 141 BrowserContext::GetDefaultQuotaManager(
awong 2012/08/10 14:17:20 Similar comment about using the active site instan
142 shell()->web_contents()->GetBrowserContext())); 142 shell()->web_contents()->GetBrowserContext()));
143 } 143 }
144 144
145 static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) { 145 static void SetTempQuota(int64 bytes, scoped_refptr<QuotaManager> qm) {
146 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { 146 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
147 BrowserThread::PostTask( 147 BrowserThread::PostTask(
148 BrowserThread::IO, FROM_HERE, 148 BrowserThread::IO, FROM_HERE,
149 base::Bind(&IndexedDBBrowserTestWithLowQuota::SetTempQuota, bytes, 149 base::Bind(&IndexedDBBrowserTestWithLowQuota::SetTempQuota, bytes,
150 qm)); 150 qm));
151 return; 151 return;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 context_impl->data_path(), 209 context_impl->data_path(),
210 kRecursive)); 210 kRecursive));
211 } 211 }
212 }; 212 };
213 213
214 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion0Schema, MigrationTest) { 214 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithVersion0Schema, MigrationTest) {
215 SimpleTest(GetTestUrl("indexeddb", "migration_test.html")); 215 SimpleTest(GetTestUrl("indexeddb", "migration_test.html"));
216 } 216 }
217 217
218 } // namespace content 218 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698