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

Side by Side Diff: content/browser/indexed_db/indexed_db_quota_client.cc

Issue 1000373002: favor DCHECK_CURRENTLY_ON for better logs in content/browser/[f-p]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 5 years, 9 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
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 "content/browser/indexed_db/indexed_db_quota_client.h" 5 #include "content/browser/indexed_db/indexed_db_quota_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/indexed_db/indexed_db_context_impl.h" 10 #include "content/browser/indexed_db/indexed_db_context_impl.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void GetAllOriginsOnIndexedDBThread(IndexedDBContextImpl* context, 34 void GetAllOriginsOnIndexedDBThread(IndexedDBContextImpl* context,
35 std::set<GURL>* origins_to_return) { 35 std::set<GURL>* origins_to_return) {
36 DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread()); 36 DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread());
37 std::vector<GURL> all_origins = context->GetAllOrigins(); 37 std::vector<GURL> all_origins = context->GetAllOrigins();
38 origins_to_return->insert(all_origins.begin(), all_origins.end()); 38 origins_to_return->insert(all_origins.begin(), all_origins.end());
39 } 39 }
40 40
41 void DidGetOrigins(const IndexedDBQuotaClient::GetOriginsCallback& callback, 41 void DidGetOrigins(const IndexedDBQuotaClient::GetOriginsCallback& callback,
42 const std::set<GURL>* origins) { 42 const std::set<GURL>* origins) {
43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 43 DCHECK_CURRENTLY_ON(BrowserThread::IO);
44 callback.Run(*origins); 44 callback.Run(*origins);
45 } 45 }
46 46
47 void GetOriginsForHostOnIndexedDBThread(IndexedDBContextImpl* context, 47 void GetOriginsForHostOnIndexedDBThread(IndexedDBContextImpl* context,
48 const std::string& host, 48 const std::string& host,
49 std::set<GURL>* origins_to_return) { 49 std::set<GURL>* origins_to_return) {
50 DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread()); 50 DCHECK(context->TaskRunner()->RunsTasksOnCurrentThread());
51 std::vector<GURL> all_origins = context->GetAllOrigins(); 51 std::vector<GURL> all_origins = context->GetAllOrigins();
52 for (const auto& origin_url : all_origins) { 52 for (const auto& origin_url : all_origins) {
53 if (host == net::GetHostOrSpecFromURL(origin_url)) 53 if (host == net::GetHostOrSpecFromURL(origin_url))
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 base::Bind( 171 base::Bind(
172 &DeleteOriginDataOnIndexedDBThread, indexed_db_context_, origin), 172 &DeleteOriginDataOnIndexedDBThread, indexed_db_context_, origin),
173 callback); 173 callback);
174 } 174 }
175 175
176 bool IndexedDBQuotaClient::DoesSupport(storage::StorageType type) const { 176 bool IndexedDBQuotaClient::DoesSupport(storage::StorageType type) const {
177 return type == storage::kStorageTypeTemporary; 177 return type == storage::kStorageTypeTemporary;
178 } 178 }
179 179
180 } // namespace content 180 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_internals_ui.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698