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

Side by Side Diff: content/shell/browser/shell_browser_main.cc

Issue 177923007: Move AppendFile and *CurrentDirectory to the 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
« no previous file with comments | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | gin/shell/gin_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/shell/browser/shell_browser_main.h" 5 #include "content/shell/browser/shell_browser_main.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 test_url = net::FilePathToFileURL(base::MakeAbsoluteFilePath(local_file)); 81 test_url = net::FilePathToFileURL(base::MakeAbsoluteFilePath(local_file));
82 } 82 }
83 base::FilePath local_path; 83 base::FilePath local_path;
84 if (current_working_directory) { 84 if (current_working_directory) {
85 // We're outside of the message loop here, and this is a test. 85 // We're outside of the message loop here, and this is a test.
86 base::ThreadRestrictions::ScopedAllowIO allow_io; 86 base::ThreadRestrictions::ScopedAllowIO allow_io;
87 if (net::FileURLToFilePath(test_url, &local_path)) 87 if (net::FileURLToFilePath(test_url, &local_path))
88 *current_working_directory = local_path.DirName(); 88 *current_working_directory = local_path.DirName();
89 else 89 else
90 file_util::GetCurrentDirectory(current_working_directory); 90 base::GetCurrentDirectory(current_working_directory);
91 } 91 }
92 return test_url; 92 return test_url;
93 } 93 }
94 94
95 bool GetNextTest(const CommandLine::StringVector& args, 95 bool GetNextTest(const CommandLine::StringVector& args,
96 size_t* position, 96 size_t* position,
97 std::string* test) { 97 std::string* test) {
98 if (*position >= args.size()) 98 if (*position >= args.size())
99 return false; 99 return false;
100 if (args[*position] == FILE_PATH_LITERAL("-")) 100 if (args[*position] == FILE_PATH_LITERAL("-"))
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 #if !defined(OS_ANDROID) 225 #if !defined(OS_ANDROID)
226 if (!layout_test_mode) 226 if (!layout_test_mode)
227 exit_code = main_runner->Run(); 227 exit_code = main_runner->Run();
228 228
229 main_runner->Shutdown(); 229 main_runner->Shutdown();
230 #endif 230 #endif
231 231
232 return exit_code; 232 return exit_code;
233 } 233 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/video_encode_accelerator_unittest.cc ('k') | gin/shell/gin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698