| 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/webui/set_as_default_browser_ui.h" | 5 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/path_service.h" | |
| 12 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/shell_integration.h" | 13 #include "chrome/browser/shell_integration.h" |
| 15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_dialogs.h" | 15 #include "chrome/browser/ui/browser_dialogs.h" |
| 17 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
| 18 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
| 19 #include "chrome/browser/ui/browser_list_observer.h" | 18 #include "chrome/browser/ui/browser_list_observer.h" |
| 20 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 21 #include "chrome/browser/ui/chrome_pages.h" | 20 #include "chrome/browser/ui/chrome_pages.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource()); | 363 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource()); |
| 365 } | 364 } |
| 366 | 365 |
| 367 // static | 366 // static |
| 368 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { | 367 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { |
| 369 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 368 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 370 SetAsDefaultBrowserDialogImpl* dialog = | 369 SetAsDefaultBrowserDialogImpl* dialog = |
| 371 new SetAsDefaultBrowserDialogImpl(profile, browser); | 370 new SetAsDefaultBrowserDialogImpl(profile, browser); |
| 372 dialog->ShowDialog(); | 371 dialog->ShowDialog(); |
| 373 } | 372 } |
| OLD | NEW |