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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_files.cc

Issue 10828126: gdata: Introduce GDataWapiFeedLoader class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_files.h" 5 #include "chrome/browser/chromeos/gdata/gdata_files.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 } else { 508 } else {
509 if ((i + 1) == (components.size() - 1)) 509 if ((i + 1) == (components.size() - 1))
510 return entry; 510 return entry;
511 else 511 else
512 return NULL; 512 return NULL;
513 } 513 }
514 } 514 }
515 return NULL; 515 return NULL;
516 } 516 }
517 517
518 void GDataDirectoryService::FindEntryByPathAndRunSync(
519 const FilePath& search_file_path,
520 const FindEntryCallback& callback) {
521 GDataEntry* entry = FindEntryByPathSync(search_file_path);
522 callback.Run(entry ? GDATA_FILE_OK : GDATA_FILE_ERROR_NOT_FOUND, entry);
523 }
524
518 GDataEntry* GDataDirectoryService::GetEntryByResourceId( 525 GDataEntry* GDataDirectoryService::GetEntryByResourceId(
519 const std::string& resource) { 526 const std::string& resource) {
520 // GDataFileSystem has already locked. 527 // GDataFileSystem has already locked.
521 ResourceMap::const_iterator iter = resource_map_.find(resource); 528 ResourceMap::const_iterator iter = resource_map_.find(resource);
522 return iter == resource_map_.end() ? NULL : iter->second; 529 return iter == resource_map_.end() ? NULL : iter->second;
523 } 530 }
524 531
525 void GDataDirectoryService::GetEntryByResourceIdAsync( 532 void GDataDirectoryService::GetEntryByResourceIdAsync(
526 const std::string& resource_id, 533 const std::string& resource_id,
527 const GetEntryByResourceIdCallback& callback) { 534 const GetEntryByResourceIdCallback& callback) {
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 if (!root_->FromProto(proto.gdata_directory())) 789 if (!root_->FromProto(proto.gdata_directory()))
783 return false; 790 return false;
784 791
785 origin_ = FROM_CACHE; 792 origin_ = FROM_CACHE;
786 largest_changestamp_ = proto.largest_changestamp(); 793 largest_changestamp_ = proto.largest_changestamp();
787 794
788 return true; 795 return true;
789 } 796 }
790 797
791 } // namespace gdata 798 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698