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

Side by Side Diff: tools/gn/setup.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 | « tools/gn/function_exec_script.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "tools/gn/setup.h" 5 #include "tools/gn/setup.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Find the .gn file. 267 // Find the .gn file.
268 base::FilePath root_path; 268 base::FilePath root_path;
269 269
270 // Prefer the command line args to the config file. 270 // Prefer the command line args to the config file.
271 base::FilePath relative_root_path = cmdline.GetSwitchValuePath(kSwitchRoot); 271 base::FilePath relative_root_path = cmdline.GetSwitchValuePath(kSwitchRoot);
272 if (!relative_root_path.empty()) { 272 if (!relative_root_path.empty()) {
273 root_path = base::MakeAbsoluteFilePath(relative_root_path); 273 root_path = base::MakeAbsoluteFilePath(relative_root_path);
274 dotfile_name_ = root_path.Append(kGnFile); 274 dotfile_name_ = root_path.Append(kGnFile);
275 } else { 275 } else {
276 base::FilePath cur_dir; 276 base::FilePath cur_dir;
277 file_util::GetCurrentDirectory(&cur_dir); 277 base::GetCurrentDirectory(&cur_dir);
278 dotfile_name_ = FindDotFile(cur_dir); 278 dotfile_name_ = FindDotFile(cur_dir);
279 if (dotfile_name_.empty()) { 279 if (dotfile_name_.empty()) {
280 Err(Location(), "Can't find source root.", 280 Err(Location(), "Can't find source root.",
281 "I could not find a \".gn\" file in the current directory or any " 281 "I could not find a \".gn\" file in the current directory or any "
282 "parent,\nand the --root command-line argument was not specified.") 282 "parent,\nand the --root command-line argument was not specified.")
283 .PrintToStdout(); 283 .PrintToStdout();
284 return false; 284 return false;
285 } 285 }
286 root_path = dotfile_name_.DirName(); 286 root_path = dotfile_name_.DirName();
287 } 287 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 433 }
434 434
435 void DependentSetup::RunPreMessageLoop() { 435 void DependentSetup::RunPreMessageLoop() {
436 CommonSetup::RunPreMessageLoop(); 436 CommonSetup::RunPreMessageLoop();
437 } 437 }
438 438
439 bool DependentSetup::RunPostMessageLoop() { 439 bool DependentSetup::RunPostMessageLoop() {
440 return CommonSetup::RunPostMessageLoop(); 440 return CommonSetup::RunPostMessageLoop();
441 } 441 }
442 442
OLDNEW
« no previous file with comments | « tools/gn/function_exec_script.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698