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

Side by Side Diff: chrome/browser/google_apis/drive_api_requests_unittest.cc

Issue 18584011: Rename base::Delete to base::DeleteFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 &run_loop, 1377 &run_loop,
1378 test_util::CreateCopyResultCallback(&result_code, &temp_file)), 1378 test_util::CreateCopyResultCallback(&result_code, &temp_file)),
1379 GetContentCallback(), 1379 GetContentCallback(),
1380 ProgressCallback()); 1380 ProgressCallback());
1381 request_sender_->StartRequestWithRetry(request); 1381 request_sender_->StartRequestWithRetry(request);
1382 run_loop.Run(); 1382 run_loop.Run();
1383 } 1383 }
1384 1384
1385 std::string contents; 1385 std::string contents;
1386 file_util::ReadFileToString(temp_file, &contents); 1386 file_util::ReadFileToString(temp_file, &contents);
1387 base::Delete(temp_file, false); 1387 base::DeleteFile(temp_file, false);
1388 1388
1389 EXPECT_EQ(HTTP_SUCCESS, result_code); 1389 EXPECT_EQ(HTTP_SUCCESS, result_code);
1390 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 1390 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
1391 EXPECT_EQ(kTestDownloadPathPrefix + kTestId, http_request_.relative_url); 1391 EXPECT_EQ(kTestDownloadPathPrefix + kTestId, http_request_.relative_url);
1392 EXPECT_EQ(kDownloadedFilePath, temp_file); 1392 EXPECT_EQ(kDownloadedFilePath, temp_file);
1393 1393
1394 const std::string expected_contents = kTestId + kTestId + kTestId; 1394 const std::string expected_contents = kTestId + kTestId + kTestId;
1395 EXPECT_EQ(expected_contents, contents); 1395 EXPECT_EQ(expected_contents, contents);
1396 } 1396 }
1397 1397
1398 } // namespace google_apis 1398 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698