| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { | 133 if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| 134 BrowserThread::PostTask( | 134 BrowserThread::PostTask( |
| 135 BrowserThread::IO, FROM_HERE, | 135 BrowserThread::IO, FROM_HERE, |
| 136 base::Bind(&IndexedDBBrowserTest::SetTempQuota, bytes, qm)); | 136 base::Bind(&IndexedDBBrowserTest::SetTempQuota, bytes, qm)); |
| 137 return; | 137 return; |
| 138 } | 138 } |
| 139 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 139 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 140 qm->SetTemporaryGlobalOverrideQuota(bytes, storage::QuotaCallback()); | 140 qm->SetTemporaryGlobalOverrideQuota(bytes, storage::QuotaCallback()); |
| 141 // Don't return until the quota has been set. | 141 // Don't return until the quota has been set. |
| 142 scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( | 142 scoped_refptr<base::ThreadTestHelper> helper(new base::ThreadTestHelper( |
| 143 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); | 143 BrowserThread::GetTaskRunnerForThread(BrowserThread::DB))); |
| 144 ASSERT_TRUE(helper->Run()); | 144 ASSERT_TRUE(helper->Run()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 virtual int64_t RequestDiskUsage() { | 147 virtual int64_t RequestDiskUsage() { |
| 148 PostTaskAndReplyWithResult( | 148 PostTaskAndReplyWithResult( |
| 149 GetContext()->TaskRunner(), | 149 GetContext()->TaskRunner(), |
| 150 FROM_HERE, | 150 FROM_HERE, |
| 151 base::Bind(&IndexedDBContext::GetOriginDiskUsage, | 151 base::Bind(&IndexedDBContext::GetOriginDiskUsage, |
| 152 GetContext(), | 152 GetContext(), |
| 153 GURL("file:///")), | 153 GURL("file:///")), |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 command_line->AppendSwitch(switches::kSingleProcess); | 854 command_line->AppendSwitch(switches::kSingleProcess); |
| 855 } | 855 } |
| 856 }; | 856 }; |
| 857 | 857 |
| 858 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, | 858 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestSingleProcess, |
| 859 RenderThreadShutdownTest) { | 859 RenderThreadShutdownTest) { |
| 860 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); | 860 SimpleTest(GetTestUrl("indexeddb", "shutdown_with_requests.html")); |
| 861 } | 861 } |
| 862 | 862 |
| 863 } // namespace content | 863 } // namespace content |
| OLD | NEW |