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

Side by Side Diff: components/drive/resource_metadata_storage.cc

Issue 1609923002: Fix remaining incompatibilities between scoped_ptr and unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 "components/drive/resource_metadata_storage.h" 5 #include "components/drive/resource_metadata_storage.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 623 }
624 } else { 624 } else {
625 LOG(ERROR) << "Failed to create resource map DB: " << status.ToString(); 625 LOG(ERROR) << "Failed to create resource map DB: " << status.ToString();
626 init_result = LevelDBStatusToDBInitStatus(status); 626 init_result = LevelDBStatusToDBInitStatus(status);
627 } 627 }
628 } 628 }
629 629
630 UMA_HISTOGRAM_ENUMERATION("Drive.MetadataDBInitResult", 630 UMA_HISTOGRAM_ENUMERATION("Drive.MetadataDBInitResult",
631 init_result, 631 init_result,
632 DB_INIT_MAX_VALUE); 632 DB_INIT_MAX_VALUE);
633 return resource_map_; 633 return !!resource_map_;
634 } 634 }
635 635
636 void ResourceMetadataStorage::RecoverCacheInfoFromTrashedResourceMap( 636 void ResourceMetadataStorage::RecoverCacheInfoFromTrashedResourceMap(
637 RecoveredCacheInfoMap* out_info) { 637 RecoveredCacheInfoMap* out_info) {
638 const base::FilePath trashed_resource_map_path = 638 const base::FilePath trashed_resource_map_path =
639 directory_path_.Append(kTrashedResourceMapDBName); 639 directory_path_.Append(kTrashedResourceMapDBName);
640 640
641 if (!base::PathExists(trashed_resource_map_path)) 641 if (!base::PathExists(trashed_resource_map_path))
642 return; 642 return;
643 643
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 RecordCheckValidityFailure( 1058 RecordCheckValidityFailure(
1059 CHECK_VALIDITY_FAILURE_CHILD_ENTRY_COUNT_MISMATCH); 1059 CHECK_VALIDITY_FAILURE_CHILD_ENTRY_COUNT_MISMATCH);
1060 return false; 1060 return false;
1061 } 1061 }
1062 1062
1063 return true; 1063 return true;
1064 } 1064 }
1065 1065
1066 } // namespace internal 1066 } // namespace internal
1067 } // namespace drive 1067 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698