Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: chrome/browser/ui/webui/set_as_default_browser_ui.cc

Issue 11881055: Simplify WebUI data sources. Currently WebUI data sources implement a URLDataSourceDelegate interfa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix issue in about_ui exposed by cros tests Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698