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

Unified Diff: chrome/browser/chromeos/drive/file_system.cc

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/drive/file_system.cc
diff --git a/chrome/browser/chromeos/drive/file_system.cc b/chrome/browser/chromeos/drive/file_system.cc
index 664908e449a2bbaca932804cc67a89798707abda..8dd4ca29b63561d98508f0dedbcff765ebea2841 100644
--- a/chrome/browser/chromeos/drive/file_system.cc
+++ b/chrome/browser/chromeos/drive/file_system.cc
@@ -32,6 +32,7 @@
#include "chrome/browser/chromeos/drive/search_metadata.h"
#include "chrome/browser/chromeos/drive/sync_client.h"
#include "chrome/common/pref_names.h"
+#include "components/user_manager/user_id.h"
#include "content/public/browser/browser_thread.h"
#include "google_apis/drive/drive_api_parser.h"
@@ -961,7 +962,7 @@ void FileSystem::MarkCacheFileAsUnmounted(
}
void FileSystem::AddPermission(const base::FilePath& drive_file_path,
- const std::string& email,
+ const user_manager::UserID& user_id,
google_apis::drive::PermissionRole role,
const FileOperationCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -978,14 +979,14 @@ void FileSystem::AddPermission(const base::FilePath& drive_file_path,
entry),
base::Bind(&FileSystem::AddPermissionAfterGetResourceEntry,
weak_ptr_factory_.GetWeakPtr(),
- email,
+ user_id,
role,
callback,
base::Owned(entry)));
}
void FileSystem::AddPermissionAfterGetResourceEntry(
- const std::string& email,
+ const user_manager::UserID& user_id,
google_apis::drive::PermissionRole role,
const FileOperationCallback& callback,
ResourceEntry* entry,
@@ -999,7 +1000,7 @@ void FileSystem::AddPermissionAfterGetResourceEntry(
scheduler_->AddPermission(
entry->resource_id(),
- email,
+ user_id,
role,
base::Bind(&RunFileOperationCallbackAsEntryActionCallback, callback));
}

Powered by Google App Engine
This is Rietveld 408576698