| OLD | NEW |
| 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/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 leveldb::Status status = db->Get(kServiceMetadataKey, &value); | 164 leveldb::Status status = db->Get(kServiceMetadataKey, &value); |
| 165 if (status.ok()) { | 165 if (status.ok()) { |
| 166 service_metadata.reset(new ServiceMetadata); | 166 service_metadata.reset(new ServiceMetadata); |
| 167 if (!service_metadata->ParseFromString(value)) | 167 if (!service_metadata->ParseFromString(value)) |
| 168 service_metadata.reset(); | 168 service_metadata.reset(); |
| 169 } else if (status.IsNotFound()) { | 169 } else if (status.IsNotFound()) { |
| 170 service_metadata.reset(new ServiceMetadata); | 170 service_metadata.reset(new ServiceMetadata); |
| 171 service_metadata->set_next_tracker_id(1); | 171 service_metadata->set_next_tracker_id(1); |
| 172 } | 172 } |
| 173 | 173 |
| 174 return service_metadata.Pass(); | 174 return service_metadata; |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace drive_backend | 177 } // namespace drive_backend |
| 178 } // namespace sync_file_system | 178 } // namespace sync_file_system |
| OLD | NEW |