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

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

Issue 654263004: Simplify ScopedVector<scoped_ptr<T>> to ScopedVector<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « tools/gn/functions.cc ('k') | tools/gn/scope.h » ('j') | 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/loader.h" 5 #include "tools/gn/loader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "tools/gn/build_settings.h" 10 #include "tools/gn/build_settings.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 Err err; 259 Err err;
260 root->Execute(&our_scope, &err); 260 root->Execute(&our_scope, &err);
261 if (err.has_error()) 261 if (err.has_error())
262 g_scheduler->FailWithError(err); 262 g_scheduler->FailWithError(err);
263 263
264 if (!our_scope.CheckForUnusedVars(&err)) 264 if (!our_scope.CheckForUnusedVars(&err))
265 g_scheduler->FailWithError(err); 265 g_scheduler->FailWithError(err);
266 266
267 // Pass all of the items that were defined off to the builder. 267 // Pass all of the items that were defined off to the builder.
268 for (const auto& item : collected_items) 268 for (auto& item : collected_items) {
269 settings->build_settings()->ItemDefined(item->Pass()); 269 settings->build_settings()->ItemDefined(make_scoped_ptr(item));
dcheng 2014/10/15 20:26:09 This is a bit awkward, but I don't know of a bette
270 item = nullptr;
271 }
270 272
271 trace.Done(); 273 trace.Done();
272 274
273 main_loop_->PostTask(FROM_HERE, base::Bind(&LoaderImpl::DidLoadFile, this)); 275 main_loop_->PostTask(FROM_HERE, base::Bind(&LoaderImpl::DidLoadFile, this));
274 } 276 }
275 277
276 void LoaderImpl::BackgroundLoadBuildConfig( 278 void LoaderImpl::BackgroundLoadBuildConfig(
277 Settings* settings, 279 Settings* settings,
278 const Scope::KeyValueMap& toolchain_overrides, 280 const Scope::KeyValueMap& toolchain_overrides,
279 const ParseNode* root) { 281 const ParseNode* root) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 const SourceFile& file_name, 411 const SourceFile& file_name,
410 const base::Callback<void(const ParseNode*)>& callback, 412 const base::Callback<void(const ParseNode*)>& callback,
411 Err* err) { 413 Err* err) {
412 if (async_load_file_.is_null()) { 414 if (async_load_file_.is_null()) {
413 return g_scheduler->input_file_manager()->AsyncLoadFile( 415 return g_scheduler->input_file_manager()->AsyncLoadFile(
414 origin, build_settings, file_name, callback, err); 416 origin, build_settings, file_name, callback, err);
415 } 417 }
416 return async_load_file_.Run( 418 return async_load_file_.Run(
417 origin, build_settings, file_name, callback, err); 419 origin, build_settings, file_name, callback, err);
418 } 420 }
OLDNEW
« no previous file with comments | « tools/gn/functions.cc ('k') | tools/gn/scope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698