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

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

Issue 1190203002: Move (most of) chrome/browser/drive into components/drive/service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed copyright headers in the new files. Created 5 years, 6 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 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/drive_backend_util.h" 5 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/threading/thread_restrictions.h" 11 #include "base/threading/thread_restrictions.h"
12 #include "chrome/browser/drive/drive_api_util.h"
13 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h" 12 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h"
14 #include "chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h" 13 #include "chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h"
15 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" 14 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
16 #include "chrome/browser/sync_file_system/logger.h" 15 #include "chrome/browser/sync_file_system/logger.h"
16 #include "components/drive/drive_api_util.h"
17 #include "google_apis/drive/drive_api_parser.h" 17 #include "google_apis/drive/drive_api_parser.h"
18 #include "third_party/leveldatabase/src/include/leveldb/status.h" 18 #include "third_party/leveldatabase/src/include/leveldb/status.h"
19 19
20 namespace sync_file_system { 20 namespace sync_file_system {
21 namespace drive_backend { 21 namespace drive_backend {
22 22
23 void PutVersionToDB(int64 version, LevelDBWrapper* db) { 23 void PutVersionToDB(int64 version, LevelDBWrapper* db) {
24 DCHECK(db); 24 DCHECK(db);
25 db->Put(kDatabaseVersionKey, base::Int64ToString(version)); 25 db->Put(kDatabaseVersionKey, base::Int64ToString(version));
26 } 26 }
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } else if (status.IsNotFound()) { 179 } else if (status.IsNotFound()) {
180 service_metadata.reset(new ServiceMetadata); 180 service_metadata.reset(new ServiceMetadata);
181 service_metadata->set_next_tracker_id(1); 181 service_metadata->set_next_tracker_id(1);
182 } 182 }
183 183
184 return service_metadata.Pass(); 184 return service_metadata.Pass();
185 } 185 }
186 186
187 } // namespace drive_backend 187 } // namespace drive_backend
188 } // namespace sync_file_system 188 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698