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

Side by Side Diff: chrome/browser/chrome_process_singleton.h

Issue 12674028: Report text output and exit code for command-line operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgotten review responses. Created 7 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/chrome_process_singleton.cc » ('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 #ifndef CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_ 5 #ifndef CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_
6 #define CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_ 6 #define CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "chrome/browser/process_singleton.h" 10 #include "chrome/browser/process_singleton.h"
(...skipping 10 matching lines...) Expand all
21 // NotificationCallback. 21 // NotificationCallback.
22 // 22 //
23 // The client must ensure that SetActiveModalDialog is called appropriately when 23 // The client must ensure that SetActiveModalDialog is called appropriately when
24 // dialogs are displayed or dismissed during startup. While a dialog is active: 24 // dialogs are displayed or dismissed during startup. While a dialog is active:
25 // 1. Neither this process nor the invoking process will handle the command 25 // 1. Neither this process nor the invoking process will handle the command
26 // line. 26 // line.
27 // 2. The active dialog is brought to the foreground and/or the taskbar icon 27 // 2. The active dialog is brought to the foreground and/or the taskbar icon
28 // flashed (using ::SetForegroundWindow on Windows). 28 // flashed (using ::SetForegroundWindow on Windows).
29 class ChromeProcessSingleton { 29 class ChromeProcessSingleton {
30 public: 30 public:
31 ChromeProcessSingleton( 31 typedef base::Callback<bool(const CommandLine& command_line,
32 const base::FilePath& user_data_dir, 32 const base::FilePath& current_directory,
33 const ProcessSingleton::NotificationCallback& notification_callback); 33 scoped_ptr<OperationOutput> operation_output)>
34 NotificationCallback;
34 35
35 ChromeProcessSingleton( 36 ChromeProcessSingleton(
36 const base::FilePath& user_data_dir, 37 const base::FilePath& user_data_dir,
37 const ProcessSingleton::NotificationCallback& notification_callback, 38 const NotificationCallback& notification_callback);
39
40 ChromeProcessSingleton(
41 const base::FilePath& user_data_dir,
42 const NotificationCallback& notification_callback,
38 const ProcessSingletonModalDialogLock::SetForegroundWindowHandler& 43 const ProcessSingletonModalDialogLock::SetForegroundWindowHandler&
39 set_foreground_window_handler); 44 set_foreground_window_handler);
40 45
41 ~ChromeProcessSingleton(); 46 ~ChromeProcessSingleton();
42 47
43 // Notify another process, if available. Otherwise sets ourselves as the 48 // Notify another process, if available. Otherwise sets ourselves as the
44 // singleton instance. Returns PROCESS_NONE if we became the singleton 49 // singleton instance. Returns PROCESS_NONE if we became the singleton
45 // instance. Callers are guaranteed to either have notified an existing 50 // instance. Callers are guaranteed to either have notified an existing
46 // process or have grabbed the singleton (unless the profile is locked by an 51 // process or have grabbed the singleton (unless the profile is locked by an
47 // unreachable process). 52 // unreachable process).
(...skipping 20 matching lines...) Expand all
68 ProcessSingletonStartupLock startup_lock_; 73 ProcessSingletonStartupLock startup_lock_;
69 ProcessSingletonModalDialogLock modal_dialog_lock_; 74 ProcessSingletonModalDialogLock modal_dialog_lock_;
70 75
71 // The basic ProcessSingleton 76 // The basic ProcessSingleton
72 ProcessSingleton process_singleton_; 77 ProcessSingleton process_singleton_;
73 78
74 DISALLOW_COPY_AND_ASSIGN(ChromeProcessSingleton); 79 DISALLOW_COPY_AND_ASSIGN(ChromeProcessSingleton);
75 }; 80 };
76 81
77 #endif // CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_ 82 #endif // CHROME_BROWSER_CHROME_PROCESS_SINGLETON_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/chrome_process_singleton.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698