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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt_win.cc

Issue 11189006: Suppress the Startup.BrowserWindowDisplay metric when the Windows 8 first-run default browser dialo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ToT Created 8 years, 2 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 | « no previous file | no next file » | 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/startup/default_browser_prompt.h" 5 #include "chrome/browser/ui/startup/default_browser_prompt.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/shell_integration.h" 9 #include "chrome/browser/shell_integration.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_finder.h" 11 #include "chrome/browser/ui/browser_finder.h"
12 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h" 12 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 #include "chrome/common/startup_metric_utils.h"
14 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/notification_service.h" 16 #include "content/public/browser/notification_service.h"
16 #include "content/public/browser/notification_types.h" 17 #include "content/public/browser/notification_types.h"
17 18
18 using content::BrowserThread; 19 using content::BrowserThread;
19 20
20 namespace { 21 namespace {
21 22
22 // Show the page prompting the user to make Chrome the default browser on 23 // Show the page prompting the user to make Chrome the default browser on
23 // Windows 8 (which means becoming "the browser" in Metro mode). The page 24 // Windows 8 (which means becoming "the browser" in Metro mode). The page
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 73 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
73 // If the only available mode of setting the default browser requires 74 // If the only available mode of setting the default browser requires
74 // user interaction, it means this couldn't have been done yet. Therefore, 75 // user interaction, it means this couldn't have been done yet. Therefore,
75 // we launch the dialog and inform the caller of it. 76 // we launch the dialog and inform the caller of it.
76 bool show_status = 77 bool show_status =
77 (ShellIntegration::CanSetAsDefaultBrowser() == 78 (ShellIntegration::CanSetAsDefaultBrowser() ==
78 ShellIntegration::SET_DEFAULT_INTERACTIVE) && 79 ShellIntegration::SET_DEFAULT_INTERACTIVE) &&
79 (ShellIntegration::IsDefaultBrowser() == 80 (ShellIntegration::IsDefaultBrowser() ==
80 ShellIntegration::NOT_DEFAULT_WEB_CLIENT); 81 ShellIntegration::NOT_DEFAULT_WEB_CLIENT);
81 82
82 if (show_status) 83 if (show_status) {
84 startup_metric_utils::SetNonBrowserUIDisplayed();
83 SetMetroBrowserFlowLauncher::LaunchSoon(profile); 85 SetMetroBrowserFlowLauncher::LaunchSoon(profile);
86 }
84 87
85 return show_status; 88 return show_status;
86 } 89 }
87 90
88 } // namespace chrome 91 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698