OLD | NEW |
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 "base/prefs/pref_service.h" | 7 #include "base/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" |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 | 32 |
33 private: | 33 private: |
34 explicit SetMetroBrowserFlowLauncher(Profile* profile) | 34 explicit SetMetroBrowserFlowLauncher(Profile* profile) |
35 : profile_(profile) { | 35 : profile_(profile) { |
36 registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 36 registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
37 content::NotificationService::AllSources()); | 37 content::NotificationService::AllSources()); |
38 } | 38 } |
39 | 39 |
40 // content::NotificationObserver override: | 40 // content::NotificationObserver override: |
41 virtual void Observe(int type, | 41 void Observe(int type, |
42 const content::NotificationSource& source, | 42 const content::NotificationSource& source, |
43 const content::NotificationDetails& details) override; | 43 const content::NotificationDetails& details) override; |
44 | 44 |
45 content::NotificationRegistrar registrar_; | 45 content::NotificationRegistrar registrar_; |
46 Profile* profile_; | 46 Profile* profile_; |
47 | 47 |
48 DISALLOW_COPY_AND_ASSIGN(SetMetroBrowserFlowLauncher); | 48 DISALLOW_COPY_AND_ASSIGN(SetMetroBrowserFlowLauncher); |
49 }; | 49 }; |
50 | 50 |
51 void SetMetroBrowserFlowLauncher::Observe( | 51 void SetMetroBrowserFlowLauncher::Observe( |
52 int type, | 52 int type, |
53 const content::NotificationSource& source, | 53 const content::NotificationSource& source, |
(...skipping 26 matching lines...) Expand all Loading... |
80 | 80 |
81 if (show_status) { | 81 if (show_status) { |
82 startup_metric_utils::SetNonBrowserUIDisplayed(); | 82 startup_metric_utils::SetNonBrowserUIDisplayed(); |
83 SetMetroBrowserFlowLauncher::LaunchSoon(profile); | 83 SetMetroBrowserFlowLauncher::LaunchSoon(profile); |
84 } | 84 } |
85 | 85 |
86 return show_status; | 86 return show_status; |
87 } | 87 } |
88 | 88 |
89 } // namespace chrome | 89 } // namespace chrome |
OLD | NEW |