[email protected] | edf04b51 | 2012-02-23 09:47:43 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "chrome/browser/process_singleton.h" |
| 6 | |
| 7 | void ProcessSingleton::Unlock() { |
| 8 | DCHECK(CalledOnValidThread()); |
| 9 | locked_ = false; |
| 10 | foreground_window_ = NULL; |
| 11 | // Replay the command lines of the messages which were received while the |
| 12 | // ProcessSingleton was locked. Only replay each message once. |
| 13 | std::set<DelayedStartupMessage> replayed_messages; |
| 14 | for (std::vector<DelayedStartupMessage>::const_iterator it = |
| 15 | saved_startup_messages_.begin(); |
| 16 | it != saved_startup_messages_.end(); ++it) { |
| 17 | if (replayed_messages.find(*it) != |
| 18 | replayed_messages.end()) |
| 19 | continue; |
[email protected] | 5d36454 | 2012-04-05 07:15:39 | [diff] [blame] | 20 | notification_callback_.Run(CommandLine(it->first), it->second); |
[email protected] | edf04b51 | 2012-02-23 09:47:43 | [diff] [blame] | 21 | replayed_messages.insert(*it); |
| 22 | } |
| 23 | saved_startup_messages_.clear(); |
| 24 | } |