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

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

Issue 2871793003: Added histograms on process singleton create when remote process exists and we cannot notify it (Closed)
Patch Set: Created 3 years, 7 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
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 #ifndef CHROME_BROWSER_PROCESS_SINGLETON_H_ 5 #ifndef CHROME_BROWSER_PROCESS_SINGLETON_H_
6 #define CHROME_BROWSER_PROCESS_SINGLETON_H_ 6 #define CHROME_BROWSER_PROCESS_SINGLETON_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // each other. It is named according to the user data directory, so 42 // each other. It is named according to the user data directory, so
43 // we can be sure that no more than one copy of the application can be 43 // we can be sure that no more than one copy of the application can be
44 // running at once with a given data directory. 44 // running at once with a given data directory.
45 // 45 //
46 // Implementation notes: 46 // Implementation notes:
47 // - the Windows implementation uses an invisible global message window; 47 // - the Windows implementation uses an invisible global message window;
48 // - the Linux implementation uses a Unix domain socket in the user data dir. 48 // - the Linux implementation uses a Unix domain socket in the user data dir.
49 49
50 class ProcessSingleton : public base::NonThreadSafe { 50 class ProcessSingleton : public base::NonThreadSafe {
51 public: 51 public:
52 // Used to send the reason of remote hang process termination as histogram.
53 enum RemoteHungProcessTerminateReason {
54 USER_ACCEPTED_TERMINATION,
55 NO_VISIBLE_WINDOW_FOUND,
56 NOTIFY_ATTEMPTS_EXCEEDED,
57 SOCKET_WRITE_FAILED,
58 SOCKET_READ_FAILED,
59 MAX_REMOTE_HUNG_PROCESS_TERMINATE_REASON
gab 2017/05/10 15:16:50 This isn't a MAX, it's a COUNT or maybe END (since
Alexey Seren 2017/05/11 13:42:05 Acknowledged. REMOTE_HUNG_PROCESS_TERMINATE_REASO
60 };
61
62 // Used to send the result of interaction with remote process as histograms in
63 // case when remote process influences on start.
64 enum RemoteProcessInteractionResult {
65 TERMINATE_SUCCEEDED,
66 TERMINATE_FAILED,
67 TERMINATE_WAIT_TIMEOUT,
68 TERMINATE_NOT_ENOUGH_PERMISSIONS,
69 REMOTE_PROCESS_SHUTTING_DOWN,
70 PROFILE_UNLOCKED,
71 REMOTE_PROCESS_NOT_FOUND,
72 FAILED_TO_EXTRACT_PID,
73 INVALID_LOCK_FILE,
74 ORPHANED_LOCK_FILE,
75 SAME_BROWSER_INSTANCE,
76 REMOTE_PROCESS_NOTIFY_FAILED,
77 MAX_HUNG_REMOTE_PROCESS_ACTION
78 };
79
52 // Logged as histograms, do not modify these values. 80 // Logged as histograms, do not modify these values.
53 enum NotifyResult { 81 enum NotifyResult {
54 PROCESS_NONE = 0, 82 PROCESS_NONE = 0,
55 PROCESS_NOTIFIED = 1, 83 PROCESS_NOTIFIED = 1,
56 PROFILE_IN_USE = 2, 84 PROFILE_IN_USE = 2,
57 LOCK_ERROR = 3, 85 LOCK_ERROR = 3,
58 LAST_VALUE = LOCK_ERROR 86 LAST_VALUE = LOCK_ERROR
59 }; 87 };
60 88
61 static constexpr int kNumNotifyResults = LAST_VALUE + 1; 89 static constexpr int kNumNotifyResults = LAST_VALUE + 1;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Helper class for linux specific messages. LinuxWatcher is ref counted 206 // Helper class for linux specific messages. LinuxWatcher is ref counted
179 // because it posts messages between threads. 207 // because it posts messages between threads.
180 class LinuxWatcher; 208 class LinuxWatcher;
181 scoped_refptr<LinuxWatcher> watcher_; 209 scoped_refptr<LinuxWatcher> watcher_;
182 #endif 210 #endif
183 211
184 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton); 212 DISALLOW_COPY_AND_ASSIGN(ProcessSingleton);
185 }; 213 };
186 214
187 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_ 215 #endif // CHROME_BROWSER_PROCESS_SINGLETON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/process_singleton_posix.cc » ('j') | chrome/browser/process_singleton_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698