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

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

Issue 1875913002: Cleanup: Convert const char* kFoo to const char kFoo[]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('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 "content/browser/indexed_db/indexed_db_context_impl.h" 5 #include "content/browser/indexed_db/indexed_db_context_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 db->ConnectionCount() - db->PendingUpgradeCount() - 207 db->ConnectionCount() - db->PendingUpgradeCount() -
208 db->RunningUpgradeCount()); 208 db->RunningUpgradeCount());
209 209
210 scoped_ptr<base::ListValue> transaction_list(new base::ListValue()); 210 scoped_ptr<base::ListValue> transaction_list(new base::ListValue());
211 std::vector<const IndexedDBTransaction*> transactions = 211 std::vector<const IndexedDBTransaction*> transactions =
212 db->transaction_coordinator().GetTransactions(); 212 db->transaction_coordinator().GetTransactions();
213 for (const auto* transaction : transactions) { 213 for (const auto* transaction : transactions) {
214 scoped_ptr<base::DictionaryValue> transaction_info( 214 scoped_ptr<base::DictionaryValue> transaction_info(
215 new base::DictionaryValue()); 215 new base::DictionaryValue());
216 216
217 const char* kModes[] = { "readonly", "readwrite", "versionchange" }; 217 const char* const kModes[] =
218 { "readonly", "readwrite", "versionchange" };
218 transaction_info->SetString("mode", kModes[transaction->mode()]); 219 transaction_info->SetString("mode", kModes[transaction->mode()]);
219 switch (transaction->state()) { 220 switch (transaction->state()) {
220 case IndexedDBTransaction::CREATED: 221 case IndexedDBTransaction::CREATED:
221 transaction_info->SetString("status", "blocked"); 222 transaction_info->SetString("status", "blocked");
222 break; 223 break;
223 case IndexedDBTransaction::STARTED: 224 case IndexedDBTransaction::STARTED:
224 if (transaction->diagnostics().tasks_scheduled > 0) 225 if (transaction->diagnostics().tasks_scheduled > 0)
225 transaction_info->SetString("status", "running"); 226 transaction_info->SetString("status", "running");
226 else 227 else
227 transaction_info->SetString("status", "started"); 228 transaction_info->SetString("status", "started");
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 void IndexedDBContextImpl::ResetCaches() { 547 void IndexedDBContextImpl::ResetCaches() {
547 origin_set_.reset(); 548 origin_set_.reset();
548 origin_size_map_.clear(); 549 origin_size_map_.clear();
549 } 550 }
550 551
551 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { 552 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const {
552 return task_runner_.get(); 553 return task_runner_.get();
553 } 554 }
554 555
555 } // namespace content 556 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_internals_ui.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698