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

Unified Diff: chrome/browser/sync_file_system/drive_file_sync_client.h

Issue 11421125: Implement polling part of DriveFileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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/sync_file_system/drive_file_sync_client.h
diff --git a/chrome/browser/sync_file_system/drive_file_sync_client.h b/chrome/browser/sync_file_system/drive_file_sync_client.h
index 48043d69bcc80bfe75adc49ee2ef2236e87d00c3..2745995dea07968fdff33e0c7f20b9e09bb0a404 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_client.h
+++ b/chrome/browser/sync_file_system/drive_file_sync_client.h
@@ -15,6 +15,7 @@
#include "chrome/browser/google_apis/drive_upload_error.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "chrome/browser/google_apis/gdata_wapi_parser.h"
+#include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
class GURL;
class Profile;
@@ -57,6 +58,7 @@ class DriveFileSyncClient : public base::NonThreadSafe,
static scoped_ptr<DriveFileSyncClient> CreateForTesting(
Profile* profile,
+ const GURL& base_url,
scoped_ptr<google_apis::DriveServiceInterface> drive_service,
scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader);
@@ -150,6 +152,12 @@ class DriveFileSyncClient : public base::NonThreadSafe,
const std::string& remote_file_md5,
const GDataErrorCallback& callback);
+ static std::string OriginToDirectoryTitle(const GURL& origin);
+ static GURL DirectoryTitleToOrigin(const std::string& title);
+
+ // Convers |resource_id| to corresponing resource link.
+ GURL ResourceIdToResourceLink(const std::string& resource_id) const;
+
private:
friend class DriveFileSyncClientTest;
friend class DriveFileSyncServiceTest;
@@ -157,6 +165,7 @@ class DriveFileSyncClient : public base::NonThreadSafe,
// Constructor for test use.
DriveFileSyncClient(
Profile* profile,
+ const GURL& base_url,
scoped_ptr<google_apis::DriveServiceInterface> drive_service,
scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader);
@@ -237,6 +246,7 @@ class DriveFileSyncClient : public base::NonThreadSafe,
scoped_ptr<google_apis::DriveServiceInterface> drive_service_;
scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader_;
+ google_apis::GDataWapiUrlGenerator url_generator_;
DISALLOW_COPY_AND_ASSIGN(DriveFileSyncClient);
};

Powered by Google App Engine
This is Rietveld 408576698