| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // just prevent showing the infobar. | 198 // just prevent showing the infobar. |
| 199 } | 199 } |
| 200 return; | 200 return; |
| 201 } | 201 } |
| 202 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 202 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
| 203 base::Bind(&CheckDefaultBrowserCallback)); | 203 base::Bind(&CheckDefaultBrowserCallback)); |
| 204 | 204 |
| 205 } | 205 } |
| 206 | 206 |
| 207 #if !defined(OS_WIN) | 207 #if !defined(OS_WIN) |
| 208 void ShowFirstRunDefaultBrowserPrompt(Profile* profile) { | 208 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { |
| 209 return false; |
| 209 } | 210 } |
| 210 #endif | 211 #endif |
| 211 | 212 |
| 212 namespace internal { | 213 namespace internal { |
| 213 | 214 |
| 214 void NotifyNotDefaultBrowserCallback() { | 215 void NotifyNotDefaultBrowserCallback() { |
| 215 Browser* browser = BrowserList::GetLastActive(); | 216 Browser* browser = BrowserList::GetLastActive(); |
| 216 if (!browser) | 217 if (!browser) |
| 217 return; // Reached during ui tests. | 218 return; // Reached during ui tests. |
| 218 | 219 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 230 bool interactive_flow = ShellIntegration::CanSetAsDefaultBrowser() == | 231 bool interactive_flow = ShellIntegration::CanSetAsDefaultBrowser() == |
| 231 ShellIntegration::SET_DEFAULT_INTERACTIVE; | 232 ShellIntegration::SET_DEFAULT_INTERACTIVE; |
| 232 infobar_helper->AddInfoBar( | 233 infobar_helper->AddInfoBar( |
| 233 new DefaultBrowserInfoBarDelegate(infobar_helper, | 234 new DefaultBrowserInfoBarDelegate(infobar_helper, |
| 234 tab->profile()->GetPrefs(), | 235 tab->profile()->GetPrefs(), |
| 235 interactive_flow)); | 236 interactive_flow)); |
| 236 } | 237 } |
| 237 | 238 |
| 238 } // namespace internal | 239 } // namespace internal |
| 239 } // namespace chrome | 240 } // namespace chrome |
| OLD | NEW |