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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10815058: gdata: Check entry_proto.get() before calling has_file_specific_info() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | chrome/browser/chromeos/extensions/file_manager_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index a0e67262b7e24937cce6ba8643b9acd418960091..c22ecb640a77179193940a641ac080947c32eb0c 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -1817,7 +1817,7 @@ void GetGDataFilePropertiesFunction::OnGetFileInfo(
scoped_ptr<gdata::GDataEntryProto> entry_proto) {
DCHECK(property_dict);
- if (!entry_proto->has_file_specific_info())
+ if (entry_proto.get() && !entry_proto->has_file_specific_info())
achuithb 2012/07/23 18:52:23 Is this logic correct? Shouldn't it be: if (!entr
satorux1 2012/07/23 19:25:34 this logic is correct. if entry_proto.get() is nul
error = gdata::GDATA_FILE_ERROR_NOT_FOUND;
if (error == gdata::GDATA_FILE_OK)
@@ -1831,7 +1831,7 @@ void GetGDataFilePropertiesFunction::OnOperationComplete(
base::DictionaryValue* property_dict,
gdata::GDataFileError error,
scoped_ptr<gdata::GDataEntryProto> entry_proto) {
- if (!entry_proto->has_file_specific_info())
+ if (entry_proto.get() && !entry_proto->has_file_specific_info())
error = gdata::GDATA_FILE_ERROR_NOT_FOUND;
if (error != gdata::GDATA_FILE_OK) {
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698