OLD | NEW |
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/build_settings.h" | 5 #include "tools/gn/build_settings.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
8 #include "tools/gn/filesystem_utils.h" | 10 #include "tools/gn/filesystem_utils.h" |
9 | 11 |
10 BuildSettings::BuildSettings() | 12 BuildSettings::BuildSettings() |
11 : check_for_bad_items_(true) { | 13 : check_for_bad_items_(true) { |
12 } | 14 } |
13 | 15 |
14 BuildSettings::BuildSettings(const BuildSettings& other) | 16 BuildSettings::BuildSettings(const BuildSettings& other) |
15 : root_path_(other.root_path_), | 17 : root_path_(other.root_path_), |
16 root_path_utf8_(other.root_path_utf8_), | 18 root_path_utf8_(other.root_path_utf8_), |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 55 } |
54 | 56 |
55 base::FilePath BuildSettings::GetFullPathSecondary( | 57 base::FilePath BuildSettings::GetFullPathSecondary( |
56 const SourceDir& dir) const { | 58 const SourceDir& dir) const { |
57 return dir.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/'); | 59 return dir.Resolve(secondary_source_path_).NormalizePathSeparatorsTo('/'); |
58 } | 60 } |
59 | 61 |
60 void BuildSettings::ItemDefined(scoped_ptr<Item> item) const { | 62 void BuildSettings::ItemDefined(scoped_ptr<Item> item) const { |
61 DCHECK(item); | 63 DCHECK(item); |
62 if (!item_defined_callback_.is_null()) | 64 if (!item_defined_callback_.is_null()) |
63 item_defined_callback_.Run(item.Pass()); | 65 item_defined_callback_.Run(std::move(item)); |
64 } | 66 } |
OLD | NEW |