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