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

Side by Side Diff: chrome/browser/drive/fake_drive_service.h

Issue 445793003: Add permission check to FakeDriveService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | chrome/browser/drive/fake_drive_service.cc » ('j') | 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 #ifndef CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_
6 #define CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ 6 #define CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_
7 7
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "chrome/browser/drive/drive_service_interface.h" 9 #include "chrome/browser/drive/drive_service_interface.h"
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const google_apis::FileResourceCallback& callback); 277 const google_apis::FileResourceCallback& callback);
278 278
279 // Sets the last modified time for an entry specified by |resource_id|. 279 // Sets the last modified time for an entry specified by |resource_id|.
280 // On success, returns HTTP_SUCCESS with the parsed entry. 280 // On success, returns HTTP_SUCCESS with the parsed entry.
281 // |callback| must not be null. 281 // |callback| must not be null.
282 void SetLastModifiedTime( 282 void SetLastModifiedTime(
283 const std::string& resource_id, 283 const std::string& resource_id,
284 const base::Time& last_modified_time, 284 const base::Time& last_modified_time,
285 const google_apis::FileResourceCallback& callback); 285 const google_apis::FileResourceCallback& callback);
286 286
287 // Sets the user's permission for an entry specified by |resource_id|.
288 google_apis::GDataErrorCode SetUserPermission(
289 const std::string& resource_id,
290 google_apis::drive::PermissionRole user_permission);
291
287 private: 292 private:
288 struct EntryInfo; 293 struct EntryInfo;
289 struct UploadSession; 294 struct UploadSession;
290 295
291 // Returns a pointer to the entry that matches |resource_id|, or NULL if 296 // Returns a pointer to the entry that matches |resource_id|, or NULL if
292 // not found. 297 // not found.
293 EntryInfo* FindEntryByResourceId(const std::string& resource_id); 298 EntryInfo* FindEntryByResourceId(const std::string& resource_id);
294 299
295 // Returns a new resource ID, which looks like "resource_id_<num>" where 300 // Returns a new resource ID, which looks like "resource_id_<num>" where
296 // <num> is a monotonically increasing number starting from 1. 301 // <num> is a monotonically increasing number starting from 1.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 GURL share_url_base_; 356 GURL share_url_base_;
352 std::string app_json_template_; 357 std::string app_json_template_;
353 std::string open_url_format_; 358 std::string open_url_format_;
354 359
355 DISALLOW_COPY_AND_ASSIGN(FakeDriveService); 360 DISALLOW_COPY_AND_ASSIGN(FakeDriveService);
356 }; 361 };
357 362
358 } // namespace drive 363 } // namespace drive
359 364
360 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_ 365 #endif // CHROME_BROWSER_DRIVE_FAKE_DRIVE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/drive/fake_drive_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698