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

Unified Diff: chrome/browser/ui/cocoa/simple_message_box_mac.mm

Issue 1169503002: Do not record startup metrics when non-browser UI was displayed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/simple_message_box_mac.mm
diff --git a/chrome/browser/ui/cocoa/simple_message_box_mac.mm b/chrome/browser/ui/cocoa/simple_message_box_mac.mm
index 732569fcf12dc588c039b7989319cb10976f80ab..508b84f12fb93863fa4017507edea00376756d76 100644
--- a/chrome/browser/ui/cocoa/simple_message_box_mac.mm
+++ b/chrome/browser/ui/cocoa/simple_message_box_mac.mm
@@ -7,6 +7,7 @@
#import <Cocoa/Cocoa.h>
#include "base/strings/sys_string_conversions.h"
+#include "chrome/browser/ui/simple_message_box_internal.h"
#include "chrome/grit/generated_resources.h"
#include "components/startup_metric_utils/startup_metric_utils.h"
#include "ui/base/l10n/l10n_util_mac.h"
@@ -21,6 +22,8 @@ MessageBoxResult ShowMessageBox(gfx::NativeWindow parent,
NOTIMPLEMENTED();
startup_metric_utils::SetNonBrowserUIDisplayed();
+ if (internal::g_should_skip_message_box_for_test)
+ return MESSAGE_BOX_RESULT_YES;
// Ignore the title; it's the window title on other platforms and ignorable.
NSAlert* alert = [[[NSAlert alloc] init] autorelease];

Powered by Google App Engine
This is Rietveld 408576698