[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / system_menu_insertion_delegate_win.cc
blob45d6bbdbf209ed924816361d9e5947dbf1339e1b
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/views/frame/system_menu_insertion_delegate_win.h"
7 #include <Windowsx.h>
9 #include <algorithm>
11 int SystemMenuInsertionDelegateWin::GetInsertionIndex(HMENU native_menu) {
12 return std::max(0, GetMenuItemCount(native_menu) - 1);