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

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

Issue 1252403005: Add output reference to gen written files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not escape paths in build.ninja.d Created 5 years, 4 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
« tools/gn/ninja_build_writer.cc ('K') | « tools/gn/scheduler.h ('k') | 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/scheduler.h" 5 #include "tools/gn/scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "tools/gn/standard_out.h" 10 #include "tools/gn/standard_out.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 std::vector<base::FilePath> Scheduler::GetGenDependencies() const { 106 std::vector<base::FilePath> Scheduler::GetGenDependencies() const {
107 base::AutoLock lock(lock_); 107 base::AutoLock lock(lock_);
108 return gen_dependencies_; 108 return gen_dependencies_;
109 } 109 }
110 110
111 void Scheduler::AddWrittenFile(const SourceFile& file) { 111 void Scheduler::AddWrittenFile(const SourceFile& file) {
112 base::AutoLock lock(lock_); 112 base::AutoLock lock(lock_);
113 written_files_.push_back(file); 113 written_files_.push_back(file);
114 } 114 }
115 115
116 std::vector<SourceFile> Scheduler::GetWrittenFiles() const {
117 base::AutoLock lock(lock_);
118 return written_files_;
119 }
120
116 void Scheduler::AddUnknownGeneratedInput(const Target* target, 121 void Scheduler::AddUnknownGeneratedInput(const Target* target,
117 const SourceFile& file) { 122 const SourceFile& file) {
118 base::AutoLock lock(lock_); 123 base::AutoLock lock(lock_);
119 unknown_generated_inputs_.insert(std::make_pair(file, target)); 124 unknown_generated_inputs_.insert(std::make_pair(file, target));
120 } 125 }
121 126
122 std::multimap<SourceFile, const Target*> 127 std::multimap<SourceFile, const Target*>
123 Scheduler::GetUnknownGeneratedInputs() const { 128 Scheduler::GetUnknownGeneratedInputs() const {
124 base::AutoLock lock(lock_); 129 base::AutoLock lock(lock_);
125 130
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void Scheduler::DoWork(const base::Closure& closure) { 176 void Scheduler::DoWork(const base::Closure& closure) {
172 closure.Run(); 177 closure.Run();
173 DecrementWorkCount(); 178 DecrementWorkCount();
174 } 179 }
175 180
176 void Scheduler::OnComplete() { 181 void Scheduler::OnComplete() {
177 // Should be called on the main thread. 182 // Should be called on the main thread.
178 DCHECK(base::MessageLoop::current() == main_loop()); 183 DCHECK(base::MessageLoop::current() == main_loop());
179 runner_.Quit(); 184 runner_.Quit();
180 } 185 }
OLDNEW
« tools/gn/ninja_build_writer.cc ('K') | « tools/gn/scheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698