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

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

Issue 9836086: Added logic that will return the result of the first chunk of root feed and continue fetching the r… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed asserts in browser_tests Created 8 years, 9 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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 md5.c_str(), 346 md5.c_str(),
347 CacheSubDirectoryTypeToString(sub_dir_type).c_str(), 347 CacheSubDirectoryTypeToString(sub_dir_type).c_str(),
348 JoinString(cache_states, ',').c_str()); 348 JoinString(cache_states, ',').c_str());
349 } 349 }
350 350
351 // GDataRootDirectory class implementation. 351 // GDataRootDirectory class implementation.
352 352
353 GDataRootDirectory::GDataRootDirectory(GDataFileSystem* file_system) 353 GDataRootDirectory::GDataRootDirectory(GDataFileSystem* file_system)
354 : ALLOW_THIS_IN_INITIALIZER_LIST(GDataDirectory(NULL, this)), 354 : ALLOW_THIS_IN_INITIALIZER_LIST(GDataDirectory(NULL, this)),
355 file_system_(file_system) { 355 file_system_(file_system) {
356 DCHECK(file_system_);
357 } 356 }
358 357
359 GDataRootDirectory::~GDataRootDirectory() { 358 GDataRootDirectory::~GDataRootDirectory() {
360 STLDeleteValues(&cache_map_); 359 STLDeleteValues(&cache_map_);
361 cache_map_.clear(); 360 cache_map_.clear();
362 361
363 resource_map_.clear(); 362 resource_map_.clear();
364 } 363 }
365 364
366 GDataRootDirectory* GDataRootDirectory::AsGDataRootDirectory() { 365 GDataRootDirectory* GDataRootDirectory::AsGDataRootDirectory() {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 DVLOG(1) << "Found entry for res_id=" << resource_id 485 DVLOG(1) << "Found entry for res_id=" << resource_id
487 << ", " << entry->ToString(); 486 << ", " << entry->ToString();
488 487
489 return entry; 488 return entry;
490 } 489 }
491 490
492 void GDataRootDirectory::GetCacheState( 491 void GDataRootDirectory::GetCacheState(
493 const std::string& resource_id, 492 const std::string& resource_id,
494 const std::string& md5, 493 const std::string& md5,
495 const GetCacheStateCallback& callback) { 494 const GetCacheStateCallback& callback) {
496 file_system_->GetCacheState(resource_id, md5, callback); 495 if (file_system_)
496 file_system_->GetCacheState(resource_id, md5, callback);
497 } 497 }
498 498
499 } // namespace gdata 499 } // namespace gdata
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc ('k') | chrome/browser/chromeos/gdata/gdata_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698