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

Unified Diff: storage/browser/fileapi/obfuscated_file_util.cc

Issue 1775453002: Replace base::Tuple in //storage with std::tuple (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update #include Created 4 years, 9 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: storage/browser/fileapi/obfuscated_file_util.cc
diff --git a/storage/browser/fileapi/obfuscated_file_util.cc b/storage/browser/fileapi/obfuscated_file_util.cc
index cdd8b7a5b6d1b542211197e6c36a9287e2a8f8a7..018249db1fdad2bfc472d724fe4282c0929dfa69 100644
--- a/storage/browser/fileapi/obfuscated_file_util.cc
+++ b/storage/browser/fileapi/obfuscated_file_util.cc
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <queue>
+#include <tuple>
#include "base/files/file_util.h"
#include "base/format_macros.h"
@@ -91,7 +92,7 @@ void UpdateUsage(FileSystemOperationContext* context,
const FileSystemURL& url,
int64_t growth) {
context->update_observers()->Notify(
- &FileUpdateObserver::OnUpdate, base::MakeTuple(url, growth));
+ &FileUpdateObserver::OnUpdate, std::make_tuple(url, growth));
}
void TouchDirectory(SandboxDirectoryDatabase* db, FileId dir_id) {
@@ -322,7 +323,7 @@ base::File::Error ObfuscatedFileUtil::EnsureFileExists(
*created = true;
UpdateUsage(context, url, growth);
context->change_observers()->Notify(
- &FileChangeObserver::OnCreateFile, base::MakeTuple(url));
+ &FileChangeObserver::OnCreateFile, std::make_tuple(url));
}
return error;
}
@@ -381,7 +382,7 @@ base::File::Error ObfuscatedFileUtil::CreateDirectory(
return error;
UpdateUsage(context, url, growth);
context->change_observers()->Notify(
- &FileChangeObserver::OnCreateDirectory, base::MakeTuple(url));
+ &FileChangeObserver::OnCreateDirectory, std::make_tuple(url));
if (first) {
first = false;
TouchDirectory(db, file_info.parent_id);
@@ -482,7 +483,7 @@ base::File::Error ObfuscatedFileUtil::Truncate(
if (error == base::File::FILE_OK) {
UpdateUsage(context, url, growth);
context->change_observers()->Notify(
- &FileChangeObserver::OnModifyFile, base::MakeTuple(url));
+ &FileChangeObserver::OnModifyFile, std::make_tuple(url));
}
return error;
}
@@ -609,16 +610,16 @@ base::File::Error ObfuscatedFileUtil::CopyOrMoveFile(
if (overwrite) {
context->change_observers()->Notify(
&FileChangeObserver::OnModifyFile,
- base::MakeTuple(dest_url));
+ std::make_tuple(dest_url));
} else {
context->change_observers()->Notify(
&FileChangeObserver::OnCreateFileFrom,
- base::MakeTuple(dest_url, src_url));
+ std::make_tuple(dest_url, src_url));
}
if (!copy) {
context->change_observers()->Notify(
- &FileChangeObserver::OnRemoveFile, base::MakeTuple(src_url));
+ &FileChangeObserver::OnRemoveFile, std::make_tuple(src_url));
TouchDirectory(db, src_file_info.parent_id);
}
@@ -697,10 +698,10 @@ base::File::Error ObfuscatedFileUtil::CopyInForeignFile(
if (overwrite) {
context->change_observers()->Notify(
- &FileChangeObserver::OnModifyFile, base::MakeTuple(dest_url));
+ &FileChangeObserver::OnModifyFile, std::make_tuple(dest_url));
} else {
context->change_observers()->Notify(
- &FileChangeObserver::OnCreateFile, base::MakeTuple(dest_url));
+ &FileChangeObserver::OnCreateFile, std::make_tuple(dest_url));
}
UpdateUsage(context, dest_url, growth);
@@ -741,7 +742,7 @@ base::File::Error ObfuscatedFileUtil::DeleteFile(
TouchDirectory(db, file_info.parent_id);
context->change_observers()->Notify(
- &FileChangeObserver::OnRemoveFile, base::MakeTuple(url));
+ &FileChangeObserver::OnRemoveFile, std::make_tuple(url));
if (error == base::File::FILE_ERROR_NOT_FOUND)
return base::File::FILE_OK;
@@ -776,7 +777,7 @@ base::File::Error ObfuscatedFileUtil::DeleteDirectory(
UpdateUsage(context, url, growth);
TouchDirectory(db, file_info.parent_id);
context->change_observers()->Notify(
- &FileChangeObserver::OnRemoveDirectory, base::MakeTuple(url));
+ &FileChangeObserver::OnRemoveDirectory, std::make_tuple(url));
return base::File::FILE_OK;
}
@@ -1372,7 +1373,7 @@ base::File ObfuscatedFileUtil::CreateOrOpenInternal(
if (file.IsValid()) {
UpdateUsage(context, url, growth);
context->change_observers()->Notify(
- &FileChangeObserver::OnCreateFile, base::MakeTuple(url));
+ &FileChangeObserver::OnCreateFile, std::make_tuple(url));
}
return file;
}
@@ -1415,7 +1416,7 @@ base::File ObfuscatedFileUtil::CreateOrOpenInternal(
if (delta) {
UpdateUsage(context, url, delta);
context->change_observers()->Notify(
- &FileChangeObserver::OnModifyFile, base::MakeTuple(url));
+ &FileChangeObserver::OnModifyFile, std::make_tuple(url));
}
return file;
}

Powered by Google App Engine
This is Rietveld 408576698