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

Side by Side Diff: chrome/browser/ui/webui/signin/user_manager_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/signin/user_manager_ui.h" 5 #include "chrome/browser/ui/webui/signin/user_manager_ui.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" 9 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h"
10 #include "chrome/browser/ui/webui/theme_source.h" 10 #include "chrome/browser/ui/webui/theme_source.h"
(...skipping 29 matching lines...) Expand all
40 #endif 40 #endif
41 } 41 }
42 42
43 UserManagerUI::~UserManagerUI() { 43 UserManagerUI::~UserManagerUI() {
44 } 44 }
45 45
46 content::WebUIDataSource* UserManagerUI::CreateUIDataSource( 46 content::WebUIDataSource* UserManagerUI::CreateUIDataSource(
47 const base::DictionaryValue& localized_strings) { 47 const base::DictionaryValue& localized_strings) {
48 content::WebUIDataSource* source = 48 content::WebUIDataSource* source =
49 content::WebUIDataSource::Create(chrome::kChromeUIUserManagerHost); 49 content::WebUIDataSource::Create(chrome::kChromeUIUserManagerHost);
50 source->SetUseJsonJSFormatV2();
51 source->AddLocalizedStrings(localized_strings); 50 source->AddLocalizedStrings(localized_strings);
52 source->SetJsonPath(kStringsJSPath); 51 source->SetJsonPath(kStringsJSPath);
53 52
54 source->SetDefaultResource(IDR_USER_MANAGER_HTML); 53 source->SetDefaultResource(IDR_USER_MANAGER_HTML);
55 source->AddResourcePath(kUserManagerJSPath, IDR_USER_MANAGER_JS); 54 source->AddResourcePath(kUserManagerJSPath, IDR_USER_MANAGER_JS);
56 55
57 return source; 56 return source;
58 } 57 }
59 58
60 void UserManagerUI::GetLocalizedStrings( 59 void UserManagerUI::GetLocalizedStrings(
61 base::DictionaryValue* localized_strings) { 60 base::DictionaryValue* localized_strings) {
62 user_manager_screen_handler_->GetLocalizedValues(localized_strings); 61 user_manager_screen_handler_->GetLocalizedValues(localized_strings);
63 webui::SetFontAndTextDirection(localized_strings); 62 webui::SetFontAndTextDirection(localized_strings);
64 63
65 #if defined(GOOGLE_CHROME_BUILD) 64 #if defined(GOOGLE_CHROME_BUILD)
66 localized_strings->SetString("buildType", "chrome"); 65 localized_strings->SetString("buildType", "chrome");
67 #else 66 #else
68 localized_strings->SetString("buildType", "chromium"); 67 localized_strings->SetString("buildType", "chromium");
69 #endif 68 #endif
70 } 69 }
71 70
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.cc ('k') | chrome/browser/ui/webui/signin_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698