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

Unified Diff: chrome/browser/ui/startup/default_browser_prompt_win.cc

Issue 2090773002: Improves first run dialog performance on Win8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/startup/default_browser_prompt_win.cc
diff --git a/chrome/browser/ui/startup/default_browser_prompt_win.cc b/chrome/browser/ui/startup/default_browser_prompt_win.cc
index 04c9cd3d42368543ae8b1f718e6bbeb7189593ff..04b4db9db4bafc11233698c64ba33463305f0fb2 100644
--- a/chrome/browser/ui/startup/default_browser_prompt_win.cc
+++ b/chrome/browser/ui/startup/default_browser_prompt_win.cc
@@ -6,18 +6,13 @@
#include "base/macros.h"
#include "base/win/windows_version.h"
+#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/webui/set_as_default_browser_ui.h"
-#include "components/prefs/pref_service.h"
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
-#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_types.h"
-
-using content::BrowserThread;
namespace {
@@ -35,7 +30,7 @@ class SetMetroBrowserFlowLauncher : public content::NotificationObserver {
private:
explicit SetMetroBrowserFlowLauncher(Profile* profile)
: profile_(profile) {
- registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_WINDOW_READY,
sky 2016/07/06 19:21:18 Use a BrowserListObserver instead of notification
zmin 2016/07/06 20:04:30 Ok, I thought only the notification type with "dep
content::NotificationService::AllSources());
}
@@ -54,10 +49,9 @@ void SetMetroBrowserFlowLauncher::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- DCHECK_EQ(content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, type);
+ DCHECK_EQ(chrome::NOTIFICATION_BROWSER_WINDOW_READY, type);
- Browser* browser = chrome::FindBrowserWithWebContents(
- content::Source<content::WebContents>(source).ptr());
+ Browser* browser = content::Source<Browser>(source).ptr();
if (!browser || !browser->is_type_tabbed())
return;

Powered by Google App Engine
This is Rietveld 408576698