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

Side by Side Diff: webkit/appcache/appcache_storage_impl.cc

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: platform specific dchecks should be platform specific 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
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/appcache/appcache_storage_impl.h" 5 #include "webkit/appcache/appcache_storage_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 }; 179 };
180 180
181 void AppCacheStorageImpl::DatabaseTask::Schedule() { 181 void AppCacheStorageImpl::DatabaseTask::Schedule() {
182 DCHECK(storage_); 182 DCHECK(storage_);
183 DCHECK(io_thread_->BelongsToCurrentThread()); 183 DCHECK(io_thread_->BelongsToCurrentThread());
184 if (storage_->db_thread_->PostTask( 184 if (storage_->db_thread_->PostTask(
185 FROM_HERE, 185 FROM_HERE,
186 base::Bind(&DatabaseTask::CallRun, this, base::TimeTicks::Now()))) { 186 base::Bind(&DatabaseTask::CallRun, this, base::TimeTicks::Now()))) {
187 storage_->scheduled_database_tasks_.push_back(this); 187 storage_->scheduled_database_tasks_.push_back(this);
188 } else { 188 } else {
189 NOTREACHED() << "The database thread is not running."; 189 NOTREACHED() << "Thread for database tasks is not running. "
190 << "This is not always the DB thread.";
190 } 191 }
191 } 192 }
192 193
193 void AppCacheStorageImpl::DatabaseTask::CancelCompletion() { 194 void AppCacheStorageImpl::DatabaseTask::CancelCompletion() {
194 DCHECK(io_thread_->BelongsToCurrentThread()); 195 DCHECK(io_thread_->BelongsToCurrentThread());
195 delegates_.clear(); 196 delegates_.clear();
196 storage_ = NULL; 197 storage_ = NULL;
197 } 198 }
198 199
199 void AppCacheStorageImpl::DatabaseTask::CallRun( 200 void AppCacheStorageImpl::DatabaseTask::CallRun(
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 if (!is_incognito_) { 1808 if (!is_incognito_) {
1808 VLOG(1) << "Deleting existing appcache data and starting over."; 1809 VLOG(1) << "Deleting existing appcache data and starting over.";
1809 db_thread_->PostTask( 1810 db_thread_->PostTask(
1810 FROM_HERE, base::Bind(base::IgnoreResult(&file_util::Delete), 1811 FROM_HERE, base::Bind(base::IgnoreResult(&file_util::Delete),
1811 cache_directory_, true)); 1812 cache_directory_, true));
1812 } 1813 }
1813 } 1814 }
1814 } 1815 }
1815 1816
1816 } // namespace appcache 1817 } // namespace appcache
OLDNEW
« content/public/test/test_renderer_host.cc ('K') | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698