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

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

Issue 2563593004: Restore clang-format formatting. (Closed)
Patch Set: Created 4 years 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
« 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/xcode_writer.h" 5 #include "tools/gn/xcode_writer.h"
6 6
7 #include <iomanip> 7 #include <iomanip>
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 18 matching lines...) Expand all
29 #include "tools/gn/variables.h" 29 #include "tools/gn/variables.h"
30 #include "tools/gn/xcode_object.h" 30 #include "tools/gn/xcode_object.h"
31 31
32 namespace { 32 namespace {
33 33
34 struct SafeEnvironmentVariableInfo { 34 struct SafeEnvironmentVariableInfo {
35 const char* name; 35 const char* name;
36 bool capture_at_generation; 36 bool capture_at_generation;
37 }; 37 };
38 38
39 // clang-format off
40 SafeEnvironmentVariableInfo kSafeEnvironmentVariables[] = { 39 SafeEnvironmentVariableInfo kSafeEnvironmentVariables[] = {
41 {"HOME", true}, 40 {"HOME", true}, {"LANG", true}, {"PATH", true},
42 {"LANG", true}, 41 {"USER", true}, {"TMPDIR", false},
43 {"PATH", true},
44 {"USER", true},
45 {"TMPDIR", false},
46 }; 42 };
47 // clang-format on
48 43
49 XcodeWriter::TargetOsType GetTargetOs(const Args& args) { 44 XcodeWriter::TargetOsType GetTargetOs(const Args& args) {
50 const Value* target_os_value = args.GetArgOverride(variables::kTargetOs); 45 const Value* target_os_value = args.GetArgOverride(variables::kTargetOs);
51 if (target_os_value) { 46 if (target_os_value) {
52 if (target_os_value->type() == Value::STRING) { 47 if (target_os_value->type() == Value::STRING) {
53 if (target_os_value->string_value() == "ios") 48 if (target_os_value->string_value() == "ios")
54 return XcodeWriter::WRITER_TARGET_OS_IOS; 49 return XcodeWriter::WRITER_TARGET_OS_IOS;
55 } 50 }
56 } 51 }
57 return XcodeWriter::WRITER_TARGET_OS_MACOS; 52 return XcodeWriter::WRITER_TARGET_OS_MACOS;
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 for (auto* object : pair.second) { 427 for (auto* object : pair.second) {
433 object->Print(out, 2); 428 object->Print(out, 2);
434 } 429 }
435 out << "/* End " << ToString(pair.first) << " section */\n"; 430 out << "/* End " << ToString(pair.first) << " section */\n";
436 } 431 }
437 432
438 out << "\t};\n" 433 out << "\t};\n"
439 << "\trootObject = " << project->Reference() << ";\n" 434 << "\trootObject = " << project->Reference() << ";\n"
440 << "}\n"; 435 << "}\n";
441 } 436 }
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