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

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

Issue 19117005: IndexedDB: Coding conventions and cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 "content/browser/indexed_db/indexed_db_context_impl.h" 5 #include "content/browser/indexed_db/indexed_db_context_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 quota_manager_proxy->RegisterClient(new IndexedDBQuotaClient(this)); 103 quota_manager_proxy->RegisterClient(new IndexedDBQuotaClient(this));
104 } 104 }
105 } 105 }
106 106
107 IndexedDBFactory* IndexedDBContextImpl::GetIDBFactory() { 107 IndexedDBFactory* IndexedDBContextImpl::GetIDBFactory() {
108 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 108 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
109 if (!idb_factory_) { 109 if (!idb_factory_) {
110 // Prime our cache of origins with existing databases so we can 110 // Prime our cache of origins with existing databases so we can
111 // detect when dbs are newly created. 111 // detect when dbs are newly created.
112 GetOriginSet(); 112 GetOriginSet();
113 idb_factory_ = IndexedDBFactory::Create(); 113 idb_factory_ = new IndexedDBFactory();
114 } 114 }
115 return idb_factory_; 115 return idb_factory_;
116 } 116 }
117 117
118 std::vector<GURL> IndexedDBContextImpl::GetAllOrigins() { 118 std::vector<GURL> IndexedDBContextImpl::GetAllOrigins() {
119 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 119 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
120 std::vector<GURL> origins; 120 std::vector<GURL> origins;
121 std::set<GURL>* origins_set = GetOriginSet(); 121 std::set<GURL>* origins_set = GetOriginSet();
122 for (std::set<GURL>::const_iterator iter = origins_set->begin(); 122 for (std::set<GURL>::const_iterator iter = origins_set->begin();
123 iter != origins_set->end(); 123 iter != origins_set->end();
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 origin_set_.reset(); 418 origin_set_.reset();
419 origin_size_map_.clear(); 419 origin_size_map_.clear();
420 space_available_map_.clear(); 420 space_available_map_.clear();
421 } 421 }
422 422
423 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { 423 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const {
424 return task_runner_; 424 return task_runner_;
425 } 425 }
426 426
427 } // namespace content 427 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698