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

Unified Diff: chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc

Issue 400313002: Fixes for re-enabling more MSVC level 4 warnings: misc edition #3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
index 9925445a86ae790816a238e1ea3c6160776825c1..9c45ab5ff911bc3175421e6fc27ff7b8df7213f4 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
@@ -362,13 +362,12 @@ ParentIDAndTitle MetadataDatabaseIndexOnDisk::PickMultiBackingFilePath() const {
return ParentIDAndTitle();
size_t pos = value.find('\0'); // '\0' is a separator.
- int64 parent_id;
- if (pos == std::string::npos ||
- !base::StringToInt64(value.substr(0, pos), &parent_id))
+ if (pos == std::string::npos)
return ParentIDAndTitle();
- // Successfully found an entry.
- return ParentIDAndTitle(parent_id, value.substr(pos + 1));
+ int64 parent_id;
+ return base::StringToInt64(value.substr(0, pos), &parent_id) ?
+ ParentIDAndTitle(parent_id, value.substr(pos + 1)) : ParentIDAndTitle();
}
int64 MetadataDatabaseIndexOnDisk::PickDirtyTracker() const {
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698