Index: chrome/browser/process_singleton_startup_lock.h |
diff --git a/chrome/browser/process_singleton_startup_lock.h b/chrome/browser/process_singleton_startup_lock.h |
index 26c00bc9da6741bd6bb867878a9cba57a963e35f..6a962c22bdcacaece5354e7fea5186484cce82cb 100644 |
--- a/chrome/browser/process_singleton_startup_lock.h |
+++ b/chrome/browser/process_singleton_startup_lock.h |
@@ -15,6 +15,8 @@ |
#include "base/threading/non_thread_safe.h" |
#include "chrome/browser/process_singleton.h" |
+class OperationOutput; |
+ |
// Provides a ProcessSingleton::NotificationCallback that can queue up |
// command-line invocations during startup and execute them when startup |
// completes. |
@@ -25,8 +27,13 @@ |
// Once unlocked, notifications are forwarded to a wrapped NotificationCallback. |
class ProcessSingletonStartupLock : public base::NonThreadSafe { |
public: |
+ typedef base::Callback<bool(const CommandLine& command_line, |
+ const base::FilePath& current_directory, |
+ scoped_ptr<OperationOutput> operation_output)> |
+ OperationCallback; |
+ |
explicit ProcessSingletonStartupLock( |
- const ProcessSingleton::NotificationCallback& original_callback); |
+ const OperationCallback& operation_callback); |
~ProcessSingletonStartupLock(); |
// Returns the ProcessSingleton::NotificationCallback. |
@@ -41,15 +48,23 @@ class ProcessSingletonStartupLock : public base::NonThreadSafe { |
bool locked() { return locked_; } |
private: |
- typedef std::pair<CommandLine::StringVector, base::FilePath> |
- DelayedStartupMessage; |
+ struct DelayedStartupMessage { |
+ DelayedStartupMessage(const CommandLine::StringVector& argv, |
+ const base::FilePath& current_directory, |
+ OperationOutput* operation_output); |
+ ~DelayedStartupMessage(); |
+ |
+ CommandLine::StringVector argv_; |
+ base::FilePath current_directory_; |
+ OperationOutput* operation_output_; |
+ }; |
bool NotificationCallbackImpl(const CommandLine& command_line, |
const base::FilePath& current_directory); |
bool locked_; |
std::vector<DelayedStartupMessage> saved_startup_messages_; |
- ProcessSingleton::NotificationCallback original_callback_; |
+ OperationCallback operation_callback_; |
DISALLOW_COPY_AND_ASSIGN(ProcessSingletonStartupLock); |
}; |