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

Side by Side Diff: chrome/browser/nacl_host/test/mock_nacl_gdb.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 #include <cstdio> 5 #include <cstdio>
6 #include <cstring> 6 #include <cstring>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 while (i < argc) { 43 while (i < argc) {
44 if (strcmp(argv[i], kEvalCommand) == 0) { 44 if (strcmp(argv[i], kEvalCommand) == 0) {
45 i += 2; 45 i += 2;
46 continue; 46 continue;
47 } 47 }
48 if (strcmp(argv[i], kCommand) == 0) { 48 if (strcmp(argv[i], kCommand) == 0) {
49 // Command line shouldn't end with --command switch without value. 49 // Command line shouldn't end with --command switch without value.
50 i += 2; 50 i += 2;
51 CHECK_LE(i, argc); 51 CHECK_LE(i, argc);
52 std::string nacl_gdb_script(argv[i - 1]); 52 std::string nacl_gdb_script(argv[i - 1]);
53 file_util::WriteFile(base::FilePath::FromUTF8Unsafe(nacl_gdb_script), 53 base::WriteFile(base::FilePath::FromUTF8Unsafe(nacl_gdb_script),
54 kPass, strlen(kPass)); 54 kPass, strlen(kPass));
55 continue; 55 continue;
56 } 56 }
57 // Unknown argument. 57 // Unknown argument.
58 NOTREACHED() << "Invalid argument " << argv[i]; 58 NOTREACHED() << "Invalid argument " << argv[i];
59 } 59 }
60 CHECK_EQ(i, argc); 60 CHECK_EQ(i, argc);
61 file_util::WriteFile(base::FilePath::FromUTF8Unsafe(mock_nacl_gdb_file), 61 base::WriteFile(base::FilePath::FromUTF8Unsafe(mock_nacl_gdb_file),
62 kPass, strlen(kPass)); 62 kPass, strlen(kPass));
63 return 0; 63 return 0;
64 } 64 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/media_folder_finder_unittest.cc ('k') | chrome/browser/net/crl_set_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698