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

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

Issue 446063006: Add an #ifdef for a ChromeOS-only resource in WebUI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 int render_frame_id, 998 int render_frame_id,
999 const content::URLDataSource::GotDataCallback& callback) { 999 const content::URLDataSource::GotDataCallback& callback) {
1000 std::string response; 1000 std::string response;
1001 // Add your data source here, in alphabetical order. 1001 // Add your data source here, in alphabetical order.
1002 if (source_name_ == chrome::kChromeUIChromeURLsHost) { 1002 if (source_name_ == chrome::kChromeUIChromeURLsHost) {
1003 response = ChromeURLs(); 1003 response = ChromeURLs();
1004 } else if (source_name_ == chrome::kChromeUICreditsHost) { 1004 } else if (source_name_ == chrome::kChromeUICreditsHost) {
1005 int idr = IDR_CREDITS_HTML; 1005 int idr = IDR_CREDITS_HTML;
1006 if (path == kCreditsJsPath) 1006 if (path == kCreditsJsPath)
1007 idr = IDR_CREDITS_JS; 1007 idr = IDR_CREDITS_JS;
1008 #if defined(OS_CHROMEOS)
1008 else if (path == kKeyboardUtilsPath) 1009 else if (path == kKeyboardUtilsPath)
1009 idr = IDR_KEYBOARD_UTILS_JS; 1010 idr = IDR_KEYBOARD_UTILS_JS;
1011 #endif
1010 1012
1011 response = ResourceBundle::GetSharedInstance().GetRawDataResource( 1013 response = ResourceBundle::GetSharedInstance().GetRawDataResource(
1012 idr).as_string(); 1014 idr).as_string();
1013 #if defined(OS_CHROMEOS) 1015 #if defined(OS_CHROMEOS)
1014 } else if (source_name_ == chrome::kChromeUIDiscardsHost) { 1016 } else if (source_name_ == chrome::kChromeUIDiscardsHost) {
1015 response = AboutDiscards(path); 1017 response = AboutDiscards(path);
1016 #endif 1018 #endif
1017 } else if (source_name_ == chrome::kChromeUIDNSHost) { 1019 } else if (source_name_ == chrome::kChromeUIDNSHost) {
1018 AboutDnsHandler::Start(profile(), callback); 1020 AboutDnsHandler::Start(profile(), callback);
1019 return; 1021 return;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 Profile* profile = Profile::FromWebUI(web_ui); 1095 Profile* profile = Profile::FromWebUI(web_ui);
1094 1096
1095 #if defined(ENABLE_THEMES) 1097 #if defined(ENABLE_THEMES)
1096 // Set up the chrome://theme/ source. 1098 // Set up the chrome://theme/ source.
1097 ThemeSource* theme = new ThemeSource(profile); 1099 ThemeSource* theme = new ThemeSource(profile);
1098 content::URLDataSource::Add(profile, theme); 1100 content::URLDataSource::Add(profile, theme);
1099 #endif 1101 #endif
1100 1102
1101 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1103 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1102 } 1104 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698