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

Side by Side Diff: tools/gn/setup.cc

Issue 265143003: Fix GN Windows size-truncation warning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | 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 #include <sstream> 10 #include <sstream>
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 base::FilePath build_arg_file = 369 base::FilePath build_arg_file =
370 build_settings_.GetFullPath(GetBuildArgFile()); 370 build_settings_.GetFullPath(GetBuildArgFile());
371 base::CreateDirectory(build_arg_file.DirName()); 371 base::CreateDirectory(build_arg_file.DirName());
372 372
373 std::string contents = stream.str(); 373 std::string contents = stream.str();
374 #if defined(OS_WIN) 374 #if defined(OS_WIN)
375 // Use Windows lineendings for this file since it will often open in 375 // Use Windows lineendings for this file since it will often open in
376 // Notepad which can't handle Unix ones. 376 // Notepad which can't handle Unix ones.
377 ReplaceSubstringsAfterOffset(&contents, 0, "\n", "\r\n"); 377 ReplaceSubstringsAfterOffset(&contents, 0, "\n", "\r\n");
378 #endif 378 #endif
379 if (base::WriteFile(build_arg_file, contents.c_str(), contents.size()) == 379 if (base::WriteFile(build_arg_file, contents.c_str(),
380 -1) { 380 static_cast<int>(contents.size())) == -1) {
381 Err(Location(), "Args file could not be written.", 381 Err(Location(), "Args file could not be written.",
382 "The file is \"" + FilePathToUTF8(build_arg_file) + 382 "The file is \"" + FilePathToUTF8(build_arg_file) +
383 "\"").PrintToStdout(); 383 "\"").PrintToStdout();
384 return false; 384 return false;
385 } 385 }
386 386
387 return true; 387 return true;
388 } 388 }
389 389
390 bool Setup::FillSourceDir(const CommandLine& cmdline) { 390 bool Setup::FillSourceDir(const CommandLine& cmdline) {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 591 }
592 592
593 void DependentSetup::RunPreMessageLoop() { 593 void DependentSetup::RunPreMessageLoop() {
594 CommonSetup::RunPreMessageLoop(); 594 CommonSetup::RunPreMessageLoop();
595 } 595 }
596 596
597 bool DependentSetup::RunPostMessageLoop() { 597 bool DependentSetup::RunPostMessageLoop() {
598 return CommonSetup::RunPostMessageLoop(); 598 return CommonSetup::RunPostMessageLoop();
599 } 599 }
600 600
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698