| OLD | NEW |
| 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_UI_COCOA_CONFIRM_QUIT_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_ | 6 #define CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_ |
| 7 | 7 |
| 8 class PrefServiceSimple; | 8 class PrefRegistrarSimple; |
| 9 | 9 |
| 10 namespace confirm_quit { | 10 namespace confirm_quit { |
| 11 | 11 |
| 12 enum ConfirmQuitMetric { | 12 enum ConfirmQuitMetric { |
| 13 // The user quit without having the feature enabled. | 13 // The user quit without having the feature enabled. |
| 14 kNoConfirm = 0, | 14 kNoConfirm = 0, |
| 15 // The user held Cmd+Q for the entire duration. | 15 // The user held Cmd+Q for the entire duration. |
| 16 kHoldDuration, | 16 kHoldDuration, |
| 17 // The user hit Cmd+Q twice for the accelerated path. | 17 // The user hit Cmd+Q twice for the accelerated path. |
| 18 kDoubleTap, | 18 kDoubleTap, |
| 19 // The user tapped Cmd+Q once and then held it. | 19 // The user tapped Cmd+Q once and then held it. |
| 20 kTapHold, | 20 kTapHold, |
| 21 | 21 |
| 22 kSampleCount | 22 kSampleCount |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 // Records the histogram value for the above metric. | 25 // Records the histogram value for the above metric. |
| 26 void RecordHistogram(ConfirmQuitMetric sample); | 26 void RecordHistogram(ConfirmQuitMetric sample); |
| 27 | 27 |
| 28 // Registers the preference in app-wide local state. | 28 // Registers the preference in app-wide local state. |
| 29 void RegisterLocalState(PrefServiceSimple* local_state); | 29 void RegisterLocalState(PrefRegistrarSimple* local_state); |
| 30 | 30 |
| 31 } // namespace confirm_quit | 31 } // namespace confirm_quit |
| 32 | 32 |
| 33 #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_ | 33 #endif // CHROME_BROWSER_UI_COCOA_CONFIRM_QUIT_H_ |
| OLD | NEW |