OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/gdata/gdata_sync_client.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_sync_client.h" |
6 | 6 |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 } | 319 } |
320 } | 320 } |
321 | 321 |
322 void GDataSyncClient::OnGetEntryInfoByResourceId( | 322 void GDataSyncClient::OnGetEntryInfoByResourceId( |
323 const std::string& resource_id, | 323 const std::string& resource_id, |
324 GDataFileError error, | 324 GDataFileError error, |
325 const FilePath& /* gdata_file_path */, | 325 const FilePath& /* gdata_file_path */, |
326 scoped_ptr<GDataEntryProto> entry_proto) { | 326 scoped_ptr<GDataEntryProto> entry_proto) { |
327 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 327 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
328 | 328 |
329 if (!entry_proto->has_file_specific_info()) | 329 if (entry_proto.get() && !entry_proto->has_file_specific_info()) |
330 error = GDATA_FILE_ERROR_NOT_FOUND; | 330 error = GDATA_FILE_ERROR_NOT_FOUND; |
331 | 331 |
332 if (error != GDATA_FILE_OK) { | 332 if (error != GDATA_FILE_OK) { |
333 LOG(WARNING) << "Entry not found: " << resource_id; | 333 LOG(WARNING) << "Entry not found: " << resource_id; |
334 return; | 334 return; |
335 } | 335 } |
336 | 336 |
337 cache_->GetCacheEntryOnUIThread( | 337 cache_->GetCacheEntryOnUIThread( |
338 resource_id, | 338 resource_id, |
339 "" /* don't check MD5 */, | 339 "" /* don't check MD5 */, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 const content::NotificationDetails& details) { | 457 const content::NotificationDetails& details) { |
458 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 458 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
459 | 459 |
460 // Resume the sync loop if gdata preferences are changed. Note that we | 460 // Resume the sync loop if gdata preferences are changed. Note that we |
461 // don't need to check the new values here as these will be checked in | 461 // don't need to check the new values here as these will be checked in |
462 // ShouldStopSyncLoop() as soon as the loop is resumed. | 462 // ShouldStopSyncLoop() as soon as the loop is resumed. |
463 StartSyncLoop(); | 463 StartSyncLoop(); |
464 } | 464 } |
465 | 465 |
466 } // namespace gdata | 466 } // namespace gdata |
OLD | NEW |