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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_cache_metadata.cc

Issue 10830181: Implement initialization for GDataCache to use in-memory metadata for tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Style and comment fixes. Created 8 years, 4 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 "chrome/browser/chromeos/gdata/gdata_cache_metadata.h" 5 #include "chrome/browser/chromeos/gdata/gdata_cache_metadata.h"
6 6
7 #include <leveldb/db.h> 7 #include <leveldb/db.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 AssertOnSequencedWorkerPool(); 589 AssertOnSequencedWorkerPool();
590 } 590 }
591 591
592 // static 592 // static
593 scoped_ptr<GDataCacheMetadata> GDataCacheMetadata::CreateGDataCacheMetadata( 593 scoped_ptr<GDataCacheMetadata> GDataCacheMetadata::CreateGDataCacheMetadata(
594 base::SequencedTaskRunner* blocking_task_runner) { 594 base::SequencedTaskRunner* blocking_task_runner) {
595 return scoped_ptr<GDataCacheMetadata>( 595 return scoped_ptr<GDataCacheMetadata>(
596 new GDataCacheMetadataDB(blocking_task_runner)); 596 new GDataCacheMetadataDB(blocking_task_runner));
597 } 597 }
598 598
599 // static
600 scoped_ptr<GDataCacheMetadata>
601 GDataCacheMetadata::CreateGDataCacheMetadataForTesting(
602 base::SequencedTaskRunner* blocking_task_runner) {
603 return scoped_ptr<GDataCacheMetadata>(
604 new GDataCacheMetadataMap(blocking_task_runner));
satorux1 2012/08/08 15:53:57 Could you rename GDataCacheMetadataMap to FakeGDat
Haruki Sato 2012/08/09 02:04:02 Done.
605 }
606
599 void GDataCacheMetadata::AssertOnSequencedWorkerPool() { 607 void GDataCacheMetadata::AssertOnSequencedWorkerPool() {
600 DCHECK(!blocking_task_runner_ || 608 DCHECK(!blocking_task_runner_ ||
601 blocking_task_runner_->RunsTasksOnCurrentThread()); 609 blocking_task_runner_->RunsTasksOnCurrentThread());
602 } 610 }
603 611
604 } // namespace gdata 612 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_cache_metadata.h ('k') | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698