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

Side by Side Diff: chrome/browser/ui/views/simple_message_box_win.cc

Issue 10662046: Add a histogram to measure browser window display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve code comments Created 8 years, 4 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/ui/cocoa/simple_message_box_mac.mm ('k') | chrome/chrome_common.gypi » ('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) 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 #include "chrome/browser/ui/simple_message_box.h" 5 #include "chrome/browser/ui/simple_message_box.h"
6 6
7 #include "chrome/common/startup_metric_utils.h"
7 #include "ui/base/win/message_box_win.h" 8 #include "ui/base/win/message_box_win.h"
8 9
9 namespace chrome { 10 namespace chrome {
10 11
11 MessageBoxResult ShowMessageBox(gfx::NativeWindow parent, 12 MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
12 const string16& title, 13 const string16& title,
13 const string16& message, 14 const string16& message,
14 MessageBoxType type) { 15 MessageBoxType type) {
16 startup_metric_utils::SetNonBrowserUIDisplayed();
17
15 UINT flags = MB_SETFOREGROUND; 18 UINT flags = MB_SETFOREGROUND;
16 flags |= ((type == MESSAGE_BOX_TYPE_QUESTION) ? MB_YESNO : MB_OK); 19 flags |= ((type == MESSAGE_BOX_TYPE_QUESTION) ? MB_YESNO : MB_OK);
17 flags |= ((type == MESSAGE_BOX_TYPE_INFORMATION) ? 20 flags |= ((type == MESSAGE_BOX_TYPE_INFORMATION) ?
18 MB_ICONINFORMATION : MB_ICONWARNING); 21 MB_ICONINFORMATION : MB_ICONWARNING);
19 return (ui::MessageBox(parent, message, title, flags) == IDNO) ? 22 return (ui::MessageBox(parent, message, title, flags) == IDNO) ?
20 MESSAGE_BOX_RESULT_NO : MESSAGE_BOX_RESULT_YES; 23 MESSAGE_BOX_RESULT_NO : MESSAGE_BOX_RESULT_YES;
21 } 24 }
22 25
23 } // namespace chrome 26 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/simple_message_box_mac.mm ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698