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

Unified Diff: chrome/browser/chromeos/gdata/gdata_files.cc

Issue 10352004: gdata: Implement periodic file system update checks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add 2 more DCHECKs to make sure we're not starting/stopping timer when it is already started/stoppe… Created 8 years, 8 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_files.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_files.cc b/chrome/browser/chromeos/gdata/gdata_files.cc
index 183329223afd36a686c8e7ac9883c6709fb2111a..144974d98003679ec58b153a36c2c5a5f2024553 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.cc
+++ b/chrome/browser/chromeos/gdata/gdata_files.cc
@@ -18,13 +18,6 @@
namespace gdata {
namespace {
-// Content refresh time.
-#ifndef NDEBUG
-const int kRefreshTimeInSec = 10;
-#else
-const int kRefreshTimeInSec = 5*60;
-#endif
-
const char kSlash[] = "/";
const char kEscapedSlash[] = "\xE2\x88\x95";
const FilePath::CharType kGDataRootDirectory[] = FILE_PATH_LITERAL("gdata");
@@ -270,21 +263,6 @@ GDataEntry* GDataDirectory::FromDocumentEntry(GDataDirectory* parent,
return dir;
}
-bool GDataDirectory::NeedsRefresh() const {
- // Already refreshing by someone else.
- if (origin_ == REFRESHING)
- return false;
-
- // Refresh is needed for content read from disk cache or stale content.
- if (origin_ == FROM_CACHE)
- return true;
-
- if ((base::Time::Now() - refresh_time_).InSeconds() < kRefreshTimeInSec)
- return false;
-
- return true;
-}
-
void GDataDirectory::AddEntry(GDataEntry* entry) {
// The entry name may have been changed due to prior name de-duplication.
// We need to first restore the file name based on the title before going

Powered by Google App Engine
This is Rietveld 408576698