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

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

Issue 10836005: gdata: Periodic refresh should be active for file lists loaded from cache. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_file_system.h" 5 #include "chrome/browser/chromeos/gdata/gdata_file_system.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 823
824 PrefService* pref_service = profile_->GetPrefs(); 824 PrefService* pref_service = profile_->GetPrefs();
825 hide_hosted_docs_ = pref_service->GetBoolean(prefs::kDisableGDataHostedFiles); 825 hide_hosted_docs_ = pref_service->GetBoolean(prefs::kDisableGDataHostedFiles);
826 826
827 InitializePreferenceObserver(); 827 InitializePreferenceObserver();
828 } 828 }
829 829
830 void GDataFileSystem::CheckForUpdates() { 830 void GDataFileSystem::CheckForUpdates() {
831 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 831 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
832 ContentOrigin initial_origin = directory_service_->origin(); 832 ContentOrigin initial_origin = directory_service_->origin();
833 if (initial_origin == FROM_SERVER) { 833 if (initial_origin != REFRESHING) {
satorux1 2012/07/30 16:18:26 looks dangerous. "origin" has been a source of nas
834 directory_service_->set_origin(REFRESHING); 834 directory_service_->set_origin(REFRESHING);
835 ReloadFeedFromServerIfNeeded( 835 ReloadFeedFromServerIfNeeded(
836 initial_origin, 836 initial_origin,
837 directory_service_->largest_changestamp(), 837 directory_service_->largest_changestamp(),
838 directory_service_->root()->GetFilePath(), 838 directory_service_->root()->GetFilePath(),
839 base::Bind(&GDataFileSystem::OnUpdateChecked, 839 base::Bind(&GDataFileSystem::OnUpdateChecked,
840 ui_weak_ptr_, 840 ui_weak_ptr_,
841 initial_origin)); 841 initial_origin));
842 } 842 }
843 } 843 }
(...skipping 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after
4279 } 4279 }
4280 4280
4281 PlatformFileInfoProto entry_file_info; 4281 PlatformFileInfoProto entry_file_info;
4282 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info); 4282 GDataEntry::ConvertPlatformFileInfoToProto(*file_info, &entry_file_info);
4283 *entry_proto->mutable_file_info() = entry_file_info; 4283 *entry_proto->mutable_file_info() = entry_file_info;
4284 if (!callback.is_null()) 4284 if (!callback.is_null())
4285 callback.Run(GDATA_FILE_OK, entry_proto.Pass()); 4285 callback.Run(GDATA_FILE_OK, entry_proto.Pass());
4286 } 4286 }
4287 4287
4288 } // namespace gdata 4288 } // namespace gdata
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698