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

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

Issue 599653003: Remove old template html boilerplate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bydefault
Patch Set: fix android Created 6 years, 2 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
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/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 MAKE_CHROME_DEFAULT_ACCEPTED = 0, 57 MAKE_CHROME_DEFAULT_ACCEPTED = 0,
58 MAKE_CHROME_DEFAULT_DECLINED = 1, 58 MAKE_CHROME_DEFAULT_DECLINED = 1,
59 MAKE_CHROME_DEFAULT_REGRETTED = 2, 59 MAKE_CHROME_DEFAULT_REGRETTED = 2,
60 // MAKE_CHROME_DEFAULT_ACCEPTED_IMMERSE = 3, // Deprecated. 60 // MAKE_CHROME_DEFAULT_ACCEPTED_IMMERSE = 3, // Deprecated.
61 MAKE_CHROME_DEFAULT_MAX 61 MAKE_CHROME_DEFAULT_MAX
62 }; 62 };
63 63
64 content::WebUIDataSource* CreateSetAsDefaultBrowserUIHTMLSource() { 64 content::WebUIDataSource* CreateSetAsDefaultBrowserUIHTMLSource() {
65 content::WebUIDataSource* data_source = content::WebUIDataSource::Create( 65 content::WebUIDataSource* data_source = content::WebUIDataSource::Create(
66 chrome::kChromeUIMetroFlowHost); 66 chrome::kChromeUIMetroFlowHost);
67 data_source->SetUseJsonJSFormatV2();
68 data_source->AddLocalizedString("page-title", IDS_METRO_FLOW_TAB_TITLE); 67 data_source->AddLocalizedString("page-title", IDS_METRO_FLOW_TAB_TITLE);
69 data_source->AddLocalizedString("flowTitle", IDS_METRO_FLOW_TITLE_SHORT); 68 data_source->AddLocalizedString("flowTitle", IDS_METRO_FLOW_TITLE_SHORT);
70 data_source->AddLocalizedString("flowDescription", 69 data_source->AddLocalizedString("flowDescription",
71 IDS_METRO_FLOW_DESCRIPTION); 70 IDS_METRO_FLOW_DESCRIPTION);
72 data_source->AddLocalizedString("flowNext", 71 data_source->AddLocalizedString("flowNext",
73 IDS_METRO_FLOW_SET_DEFAULT); 72 IDS_METRO_FLOW_SET_DEFAULT);
74 data_source->AddLocalizedString("chromeLogoString", 73 data_source->AddLocalizedString("chromeLogoString",
75 IDS_METRO_FLOW_LOGO_STRING_ALT); 74 IDS_METRO_FLOW_LOGO_STRING_ALT);
76 data_source->SetJsonPath("strings.js"); 75 data_source->SetJsonPath("strings.js");
77 data_source->AddResourcePath("set_as_default_browser.js", 76 data_source->AddResourcePath("set_as_default_browser.js",
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource()); 364 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource());
366 } 365 }
367 366
368 // static 367 // static
369 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { 368 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) {
370 DCHECK_CURRENTLY_ON(BrowserThread::UI); 369 DCHECK_CURRENTLY_ON(BrowserThread::UI);
371 SetAsDefaultBrowserDialogImpl* dialog = 370 SetAsDefaultBrowserDialogImpl* dialog =
372 new SetAsDefaultBrowserDialogImpl(profile, browser); 371 new SetAsDefaultBrowserDialogImpl(profile, browser);
373 dialog->ShowDialog(); 372 dialog->ShowDialog();
374 } 373 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/quota_internals/quota_internals_ui.cc ('k') | chrome/browser/ui/webui/signin/inline_login_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698