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

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

Issue 671873004: Migrates legacy packaged app data when it's upgraded to a platform app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes based on review comments Created 6 years, 1 month 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_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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 return 0; 339 return 0;
340 340
341 return factory_->GetConnectionCount(origin_url); 341 return factory_->GetConnectionCount(origin_url);
342 } 342 }
343 343
344 base::FilePath IndexedDBContextImpl::GetFilePath(const GURL& origin_url) const { 344 base::FilePath IndexedDBContextImpl::GetFilePath(const GURL& origin_url) const {
345 std::string origin_id = storage::GetIdentifierFromOrigin(origin_url); 345 std::string origin_id = storage::GetIdentifierFromOrigin(origin_url);
346 return GetIndexedDBFilePath(origin_id); 346 return GetIndexedDBFilePath(origin_id);
347 } 347 }
348 348
349 base::FilePath IndexedDBContextImpl::GetFilePathForTesting(
350 const std::string& origin_id) const {
351 return GetIndexedDBFilePath(origin_id);
352 }
353
354 void IndexedDBContextImpl::SetTaskRunnerForTesting( 349 void IndexedDBContextImpl::SetTaskRunnerForTesting(
355 base::SequencedTaskRunner* task_runner) { 350 base::SequencedTaskRunner* task_runner) {
356 DCHECK(!task_runner_.get()); 351 DCHECK(!task_runner_.get());
357 task_runner_ = task_runner; 352 task_runner_ = task_runner;
358 } 353 }
359 354
360 void IndexedDBContextImpl::ConnectionOpened(const GURL& origin_url, 355 void IndexedDBContextImpl::ConnectionOpened(const GURL& origin_url,
361 IndexedDBConnection* connection) { 356 IndexedDBConnection* connection) {
362 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 357 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
363 if (quota_manager_proxy()) { 358 if (quota_manager_proxy()) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 origin_set_.reset(); 540 origin_set_.reset();
546 origin_size_map_.clear(); 541 origin_size_map_.clear();
547 space_available_map_.clear(); 542 space_available_map_.clear();
548 } 543 }
549 544
550 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const { 545 base::SequencedTaskRunner* IndexedDBContextImpl::TaskRunner() const {
551 return task_runner_.get(); 546 return task_runner_.get();
552 } 547 }
553 548
554 } // namespace content 549 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698