| OLD | NEW |
| 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/drive_cache_metadata.h" | 5 #include "chrome/browser/chromeos/gdata/drive_cache_metadata.h" |
| 6 | 6 |
| 7 #include <leveldb/db.h> | 7 #include <leveldb/db.h> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
| 12 #include "chrome/browser/chromeos/gdata/drive.pb.h" | |
| 13 #include "chrome/browser/chromeos/gdata/drive_file_system_util.h" | 12 #include "chrome/browser/chromeos/gdata/drive_file_system_util.h" |
| 13 #include "chrome/browser/google_apis/drive.pb.h" |
| 14 | 14 |
| 15 namespace gdata { | 15 namespace gdata { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // A map table of resource ID to file path. | 19 // A map table of resource ID to file path. |
| 20 typedef std::map<std::string, FilePath> ResourceIdToFilePathMap; | 20 typedef std::map<std::string, FilePath> ResourceIdToFilePathMap; |
| 21 | 21 |
| 22 const FilePath::CharType kDriveCacheMetadataDBPath[] = | 22 const FilePath::CharType kDriveCacheMetadataDBPath[] = |
| 23 FILE_PATH_LITERAL("cache_metadata.db"); | 23 FILE_PATH_LITERAL("cache_metadata.db"); |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 return scoped_ptr<DriveCacheMetadata>( | 603 return scoped_ptr<DriveCacheMetadata>( |
| 604 new FakeDriveCacheMetadata(blocking_task_runner)); | 604 new FakeDriveCacheMetadata(blocking_task_runner)); |
| 605 } | 605 } |
| 606 | 606 |
| 607 void DriveCacheMetadata::AssertOnSequencedWorkerPool() { | 607 void DriveCacheMetadata::AssertOnSequencedWorkerPool() { |
| 608 DCHECK(!blocking_task_runner_ || | 608 DCHECK(!blocking_task_runner_ || |
| 609 blocking_task_runner_->RunsTasksOnCurrentThread()); | 609 blocking_task_runner_->RunsTasksOnCurrentThread()); |
| 610 } | 610 } |
| 611 | 611 |
| 612 } // namespace gdata | 612 } // namespace gdata |
| OLD | NEW |