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

Side by Side Diff: chrome/browser/process_singleton.cc

Issue 9968053: Refactor ProcessSingleton so that it may be used distinctly from a full browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include cleanup. Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/process_singleton.h" 5 #include "chrome/browser/process_singleton.h"
6 6
7 void ProcessSingleton::Unlock() { 7 void ProcessSingleton::Unlock() {
8 DCHECK(CalledOnValidThread()); 8 DCHECK(CalledOnValidThread());
9 locked_ = false; 9 locked_ = false;
10 foreground_window_ = NULL; 10 foreground_window_ = NULL;
11 // Replay the command lines of the messages which were received while the 11 // Replay the command lines of the messages which were received while the
12 // ProcessSingleton was locked. Only replay each message once. 12 // ProcessSingleton was locked. Only replay each message once.
13 std::set<DelayedStartupMessage> replayed_messages; 13 std::set<DelayedStartupMessage> replayed_messages;
14 for (std::vector<DelayedStartupMessage>::const_iterator it = 14 for (std::vector<DelayedStartupMessage>::const_iterator it =
15 saved_startup_messages_.begin(); 15 saved_startup_messages_.begin();
16 it != saved_startup_messages_.end(); ++it) { 16 it != saved_startup_messages_.end(); ++it) {
17 if (replayed_messages.find(*it) != 17 if (replayed_messages.find(*it) !=
18 replayed_messages.end()) 18 replayed_messages.end())
19 continue; 19 continue;
20 ProcessCommandLine(CommandLine(it->first), it->second); 20 notification_callback_.Run(CommandLine(it->first), it->second);
21 replayed_messages.insert(*it); 21 replayed_messages.insert(*it);
22 } 22 }
23 saved_startup_messages_.clear(); 23 saved_startup_messages_.clear();
24 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698