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

Side by Side Diff: chrome/browser/sync_file_system/drive_file_sync_client.h

Issue 11411280: Sync FileSystem: Use app id part of the URL for its directory title. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup 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 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 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_ 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_ 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // Deletes the file identified by |resource_id|. 139 // Deletes the file identified by |resource_id|.
140 // |remote_file_md5| represents the expected hash value of the file to be 140 // |remote_file_md5| represents the expected hash value of the file to be
141 // deleted from Drive. If |remote_file_md5| is different from the actual 141 // deleted from Drive. If |remote_file_md5| is different from the actual
142 // value, cancels the deletion and invokes |callback| with 142 // value, cancels the deletion and invokes |callback| with
143 // GDataErrorCode::HTTP_CONFLICT immediately. 143 // GDataErrorCode::HTTP_CONFLICT immediately.
144 void DeleteFile(const std::string& resource_id, 144 void DeleteFile(const std::string& resource_id,
145 const std::string& remote_file_md5, 145 const std::string& remote_file_md5,
146 const GDataErrorCallback& callback); 146 const GDataErrorCallback& callback);
147 147
148 static std::string OriginToDirectoryTitle(const GURL& origin);
149 static GURL DirectoryTitleToOrigin(const std::string& title);
150
148 private: 151 private:
149 friend class DriveFileSyncClientTest; 152 friend class DriveFileSyncClientTest;
150 friend class DriveFileSyncServiceTest; 153 friend class DriveFileSyncServiceTest;
151 154
152 // Constructor for test use. 155 // Constructor for test use.
153 DriveFileSyncClient( 156 DriveFileSyncClient(
154 Profile* profile, 157 Profile* profile,
155 scoped_ptr<google_apis::DriveServiceInterface> drive_service, 158 scoped_ptr<google_apis::DriveServiceInterface> drive_service,
156 scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader); 159 scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader);
157 160
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 235
233 scoped_ptr<google_apis::DriveServiceInterface> drive_service_; 236 scoped_ptr<google_apis::DriveServiceInterface> drive_service_;
234 scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader_; 237 scoped_ptr<google_apis::DriveUploaderInterface> drive_uploader_;
235 238
236 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncClient); 239 DISALLOW_COPY_AND_ASSIGN(DriveFileSyncClient);
237 }; 240 };
238 241
239 } // namespace sync_file_system 242 } // namespace sync_file_system
240 243
241 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_ 244 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_FILE_SYNC_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698