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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/metadata_database.cc

Issue 96413002: Move c/b/google_apis to google_apis/drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync_file_system/drive_backend/metadata_database.h" 5 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/message_loop/message_loop_proxy.h" 15 #include "base/message_loop/message_loop_proxy.h"
16 #include "base/sequenced_task_runner.h" 16 #include "base/sequenced_task_runner.h"
17 #include "base/stl_util.h" 17 #include "base/stl_util.h"
18 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
21 #include "base/task_runner_util.h" 21 #include "base/task_runner_util.h"
22 #include "base/threading/thread_restrictions.h" 22 #include "base/threading/thread_restrictions.h"
23 #include "chrome/browser/drive/drive_api_util.h" 23 #include "chrome/browser/drive/drive_api_util.h"
24 #include "chrome/browser/google_apis/drive_api_parser.h"
25 #include "chrome/browser/google_apis/drive_entry_kinds.h"
26 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h" 24 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h"
27 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" 25 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
28 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" 26 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
29 #include "chrome/browser/sync_file_system/drive_backend/metadata_db_migration_ut il.h" 27 #include "chrome/browser/sync_file_system/drive_backend/metadata_db_migration_ut il.h"
30 #include "chrome/browser/sync_file_system/logger.h" 28 #include "chrome/browser/sync_file_system/logger.h"
31 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" 29 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
30 #include "google_apis/drive/drive_api_parser.h"
31 #include "google_apis/drive/drive_entry_kinds.h"
32 #include "third_party/leveldatabase/src/include/leveldb/db.h" 32 #include "third_party/leveldatabase/src/include/leveldb/db.h"
33 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" 33 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
34 #include "webkit/common/fileapi/file_system_util.h" 34 #include "webkit/common/fileapi/file_system_util.h"
35 35
36 namespace sync_file_system { 36 namespace sync_file_system {
37 namespace drive_backend { 37 namespace drive_backend {
38 38
39 struct DatabaseContents { 39 struct DatabaseContents {
40 scoped_ptr<ServiceMetadata> service_metadata; 40 scoped_ptr<ServiceMetadata> service_metadata;
41 ScopedVector<FileMetadata> file_metadata; 41 ScopedVector<FileMetadata> file_metadata;
(...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 int64 change_id) { 1759 int64 change_id) {
1760 FileByID::const_iterator found = file_by_id_.find(file_id); 1760 FileByID::const_iterator found = file_by_id_.find(file_id);
1761 if (found == file_by_id_.end()) 1761 if (found == file_by_id_.end())
1762 return false; 1762 return false;
1763 DCHECK(found->second->has_details()); 1763 DCHECK(found->second->has_details());
1764 return found->second->details().change_id() >= change_id; 1764 return found->second->details().change_id() >= change_id;
1765 } 1765 }
1766 1766
1767 } // namespace drive_backend 1767 } // namespace drive_backend
1768 } // namespace sync_file_system 1768 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698