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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.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
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index bf441df31f4bad2b6249e5036a95cb525e178ff4..def3a9b817c2314461ae3e94621ee6bfa786840f 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -1905,7 +1905,7 @@ void GDataFileSystem::GetResolvedFileByPath(
const GDataEntryProto* entry_proto) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!entry_proto->has_file_specific_info())
+ if (entry_proto.get() && !entry_proto->has_file_specific_info())
error = GDATA_FILE_ERROR_NOT_FOUND;
if (error != GDATA_FILE_OK) {
@@ -3793,7 +3793,7 @@ void GDataFileSystem::OnGetEntryInfoCompleteForOpenFile(
scoped_ptr<GDataEntryProto> entry_proto) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!entry_proto->has_file_specific_info())
+ if (entry_proto.get() && !entry_proto->has_file_specific_info())
error = GDATA_FILE_ERROR_NOT_FOUND;
if (error == GDATA_FILE_OK) {
@@ -3918,7 +3918,7 @@ void GDataFileSystem::OnGetEntryInfoCompleteForCloseFile(
const FileOperationCallback& callback,
GDataFileError error,
scoped_ptr<GDataEntryProto> entry_proto) {
- if (!entry_proto->has_file_specific_info())
+ if (entry_proto.get() && !entry_proto->has_file_specific_info())
error = GDATA_FILE_ERROR_NOT_FOUND;
if (error != GDATA_FILE_OK) {

Powered by Google App Engine
This is Rietveld 408576698