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/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Used to delay the expiration of the info-bar. | 97 // Used to delay the expiration of the info-bar. |
98 base::WeakPtrFactory<DefaultBrowserInfoBarDelegate> weak_factory_; | 98 base::WeakPtrFactory<DefaultBrowserInfoBarDelegate> weak_factory_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserInfoBarDelegate); | 100 DISALLOW_COPY_AND_ASSIGN(DefaultBrowserInfoBarDelegate); |
101 }; | 101 }; |
102 | 102 |
103 // static | 103 // static |
104 void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service, | 104 void DefaultBrowserInfoBarDelegate::Create(InfoBarService* infobar_service, |
105 PrefService* prefs, | 105 PrefService* prefs, |
106 bool interactive_flow_required) { | 106 bool interactive_flow_required) { |
107 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( | 107 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( |
108 scoped_ptr<ConfirmInfoBarDelegate>(new DefaultBrowserInfoBarDelegate( | 108 scoped_ptr<ConfirmInfoBarDelegate>(new DefaultBrowserInfoBarDelegate( |
109 prefs, interactive_flow_required)))); | 109 prefs, interactive_flow_required)))); |
110 } | 110 } |
111 | 111 |
112 DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate( | 112 DefaultBrowserInfoBarDelegate::DefaultBrowserInfoBarDelegate( |
113 PrefService* prefs, | 113 PrefService* prefs, |
114 bool interactive_flow_required) | 114 bool interactive_flow_required) |
115 : ConfirmInfoBarDelegate(), | 115 : ConfirmInfoBarDelegate(), |
116 prefs_(prefs), | 116 prefs_(prefs), |
117 action_taken_(false), | 117 action_taken_(false), |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 base::Bind(&CheckDefaultBrowserCallback, desktop_type)); | 256 base::Bind(&CheckDefaultBrowserCallback, desktop_type)); |
257 } | 257 } |
258 | 258 |
259 #if !defined(OS_WIN) | 259 #if !defined(OS_WIN) |
260 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { | 260 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { |
261 return false; | 261 return false; |
262 } | 262 } |
263 #endif | 263 #endif |
264 | 264 |
265 } // namespace chrome | 265 } // namespace chrome |
OLD | NEW |