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

Unified Diff: chrome/browser/chromeos/gdata/gdata_files.cc

Issue 10384204: gdata: Fix a bug that caused google drive not to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | chrome/browser/chromeos/gdata/gdata_files_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_files.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_files.cc b/chrome/browser/chromeos/gdata/gdata_files.cc
index a1350d85e0e9529ee8473cf0cf037c8424a357d3..a7e9bfd7b2f23a194d4d9eadf789e0a3e7daf9a7 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.cc
+++ b/chrome/browser/chromeos/gdata/gdata_files.cc
@@ -866,6 +866,15 @@ bool GDataRootDirectory::ParseFromString(const std::string& serialized_proto) {
new GDataRootDirectoryProto());
bool ok = proto->ParseFromString(serialized_proto);
if (ok) {
+ // The title field for the root directory was originally empty, then
achuithb 2012/05/16 18:25:17 Do you think we should we plan to delete this code
satorux1 2012/05/16 18:28:15 I think the code here will be deleted anyway once
+ // changed to "gdata", then changed to "drive". Discard the proto data if
+ // the older formats are detected. See crbug.com/128133 for details.
+ const std::string& title = proto->gdata_directory().gdata_entry().title();
+ if (title != "drive") {
+ LOG(ERROR) << "Incompatible proto detected: " << title;
+ return false;
+ }
+
FromProto(*proto.get());
set_origin(FROM_CACHE);
set_refresh_time(base::Time::Now());
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_files_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698