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.h" | 8 #include "base/message_loop.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return; | 203 return; |
204 } | 204 } |
205 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 205 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
206 base::Bind(&CheckDefaultBrowserCallback)); | 206 base::Bind(&CheckDefaultBrowserCallback)); |
207 | 207 |
208 } | 208 } |
209 | 209 |
210 #if !defined(OS_WIN) | 210 #if !defined(OS_WIN) |
211 void ShowFirstRunDefaultBrowserPrompt(Profile* profile) { | 211 void ShowFirstRunDefaultBrowserPrompt(Profile* profile) { |
212 } | 212 } |
| 213 |
| 214 bool ExpectDefaultBrowserPromptDialog(Profile* profile, bool is_first_run) { |
| 215 return false; |
| 216 } |
213 #endif | 217 #endif |
214 | 218 |
215 namespace internal { | 219 namespace internal { |
216 | 220 |
217 void NotifyNotDefaultBrowserCallback() { | 221 void NotifyNotDefaultBrowserCallback() { |
218 Browser* browser = BrowserList::GetLastActive(); | 222 Browser* browser = BrowserList::GetLastActive(); |
219 if (!browser) | 223 if (!browser) |
220 return; // Reached during ui tests. | 224 return; // Reached during ui tests. |
221 | 225 |
222 // In ChromeBot tests, there might be a race. This line appears to get | 226 // In ChromeBot tests, there might be a race. This line appears to get |
(...skipping 10 matching lines...) Expand all Loading... |
233 bool interactive_flow = ShellIntegration::CanSetAsDefaultBrowser() == | 237 bool interactive_flow = ShellIntegration::CanSetAsDefaultBrowser() == |
234 ShellIntegration::SET_DEFAULT_INTERACTIVE; | 238 ShellIntegration::SET_DEFAULT_INTERACTIVE; |
235 infobar_helper->AddInfoBar( | 239 infobar_helper->AddInfoBar( |
236 new DefaultBrowserInfoBarDelegate(infobar_helper, | 240 new DefaultBrowserInfoBarDelegate(infobar_helper, |
237 tab->profile()->GetPrefs(), | 241 tab->profile()->GetPrefs(), |
238 interactive_flow)); | 242 interactive_flow)); |
239 } | 243 } |
240 | 244 |
241 } // namespace internal | 245 } // namespace internal |
242 } // namespace chrome | 246 } // namespace chrome |
OLD | NEW |