OLD | NEW |
---|---|
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/bundle_data.h" | 5 #include "tools/gn/bundle_data.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "tools/gn/filesystem_utils.h" | 8 #include "tools/gn/filesystem_utils.h" |
9 #include "tools/gn/output_file.h" | 9 #include "tools/gn/output_file.h" |
10 #include "tools/gn/settings.h" | 10 #include "tools/gn/settings.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 size_t first_component = bundle_root_relative.find('/'); | 122 size_t first_component = bundle_root_relative.find('/'); |
123 if (first_component != std::string::npos) { | 123 if (first_component != std::string::npos) { |
124 base::StringPiece outermost_bundle_dir = | 124 base::StringPiece outermost_bundle_dir = |
125 base::StringPiece(bundle_root_relative).substr(0, first_component); | 125 base::StringPiece(bundle_root_relative).substr(0, first_component); |
126 std::string return_value(build_dir.value()); | 126 std::string return_value(build_dir.value()); |
127 outermost_bundle_dir.AppendToString(&return_value); | 127 outermost_bundle_dir.AppendToString(&return_value); |
128 return SourceFile(SourceFile::SWAP_IN, &return_value); | 128 return SourceFile(SourceFile::SWAP_IN, &return_value); |
129 } | 129 } |
130 return SourceFile(root_dir().value()); | 130 return SourceFile(root_dir().value()); |
131 } | 131 } |
132 | |
133 SourceDir BundleData::GetBundleRootDirOutputAsDir( | |
134 const Settings* settings) const { | |
135 return SourceDir(GetBundleRootDirOutput(settings).value()); | |
sdefresne
2016/05/17 18:45:36
I think you need to add the trailing "/" when call
Robert Sesek
2016/05/17 18:49:34
SourceFile DCHECKs if there is a slash, but Source
sdefresne
2016/05/18 08:08:41
Ah good.
| |
136 } | |
OLD | NEW |