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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc

Issue 99923002: Move temp file functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h" 5 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_util.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 FileDetails* details = file->mutable_details(); 121 FileDetails* details = file->mutable_details();
122 details->set_change_id(change_id); 122 details->set_change_id(change_id);
123 details->set_missing(true); 123 details->set_missing(true);
124 return file.Pass(); 124 return file.Pass();
125 } 125 }
126 126
127 webkit_blob::ScopedFile CreateTemporaryFile( 127 webkit_blob::ScopedFile CreateTemporaryFile(
128 base::TaskRunner* file_task_runner) { 128 base::TaskRunner* file_task_runner) {
129 base::FilePath temp_file_path; 129 base::FilePath temp_file_path;
130 if (!file_util::CreateTemporaryFile(&temp_file_path)) 130 if (!base::CreateTemporaryFile(&temp_file_path))
131 return webkit_blob::ScopedFile(); 131 return webkit_blob::ScopedFile();
132 132
133 return webkit_blob::ScopedFile( 133 return webkit_blob::ScopedFile(
134 temp_file_path, 134 temp_file_path,
135 webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT, 135 webkit_blob::ScopedFile::DELETE_ON_SCOPE_OUT,
136 file_task_runner); 136 file_task_runner);
137 } 137 }
138 138
139 std::string FileKindToString(FileKind file_kind) { 139 std::string FileKindToString(FileKind file_kind) {
140 switch (file_kind) { 140 switch (file_kind) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 oldest.reset(entry); 179 oldest.reset(entry);
180 candidates[i] = NULL; 180 candidates[i] = NULL;
181 } 181 }
182 } 182 }
183 183
184 return oldest.Pass(); 184 return oldest.Pass();
185 } 185 }
186 186
187 } // namespace drive_backend 187 } // namespace drive_backend
188 } // namespace sync_file_system 188 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698