| 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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // choice. | 381 // choice. |
| 382 BrowserThread::PostTask( | 382 BrowserThread::PostTask( |
| 383 BrowserThread::UI, FROM_HERE, | 383 BrowserThread::UI, FROM_HERE, |
| 384 base::Bind(&browser::AttemptRestart)); | 384 base::Bind(&browser::AttemptRestart)); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace | 387 } // namespace |
| 388 | 388 |
| 389 SetAsDefaultBrowserUI::SetAsDefaultBrowserUI(content::WebUI* web_ui) | 389 SetAsDefaultBrowserUI::SetAsDefaultBrowserUI(content::WebUI* web_ui) |
| 390 : ui::WebDialogUI(web_ui) { | 390 : ui::WebDialogUI(web_ui) { |
| 391 ChromeURLDataManager::AddDataSource(Profile::FromWebUI(web_ui), | 391 ChromeURLDataManager::AddDataSourceImpl( |
| 392 CreateSetAsDefaultBrowserUIHTMLSource()); | 392 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource()); |
| 393 } | 393 } |
| 394 | 394 |
| 395 // static | 395 // static |
| 396 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { | 396 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { |
| 397 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 397 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 398 SetAsDefaultBrowserDialogImpl* dialog = | 398 SetAsDefaultBrowserDialogImpl* dialog = |
| 399 new SetAsDefaultBrowserDialogImpl(profile, browser); | 399 new SetAsDefaultBrowserDialogImpl(profile, browser); |
| 400 dialog->ShowDialog(); | 400 dialog->ShowDialog(); |
| 401 } | 401 } |
| OLD | NEW |