OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 source_->FinishDataRequest(template_html, request_id_); | 1246 source_->FinishDataRequest(template_html, request_id_); |
1247 } | 1247 } |
1248 | 1248 |
1249 #if defined(OS_CHROMEOS) | 1249 #if defined(OS_CHROMEOS) |
1250 // ChromeOSAboutVersionHandler ----------------------------------------------- | 1250 // ChromeOSAboutVersionHandler ----------------------------------------------- |
1251 | 1251 |
1252 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler(AboutSource* source, | 1252 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler(AboutSource* source, |
1253 int request_id) | 1253 int request_id) |
1254 : source_(source), | 1254 : source_(source), |
1255 request_id_(request_id) { | 1255 request_id_(request_id) { |
| 1256 loader_.EnablePlatformVersions(true); |
1256 loader_.GetVersion(&consumer_, | 1257 loader_.GetVersion(&consumer_, |
1257 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), | 1258 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), |
1258 chromeos::VersionLoader::VERSION_FULL); | 1259 chromeos::VersionLoader::VERSION_FULL); |
1259 } | 1260 } |
1260 | 1261 |
1261 void ChromeOSAboutVersionHandler::OnVersion( | 1262 void ChromeOSAboutVersionHandler::OnVersion( |
1262 chromeos::VersionLoader::Handle handle, | 1263 chromeos::VersionLoader::Handle handle, |
1263 std::string version) { | 1264 std::string version) { |
1264 DictionaryValue localized_strings; | 1265 DictionaryValue localized_strings; |
1265 localized_strings.SetString("os_version", version); | 1266 localized_strings.SetString("os_version", version); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 return false; | 1433 return false; |
1433 } | 1434 } |
1434 | 1435 |
1435 std::vector<std::string> AboutPaths() { | 1436 std::vector<std::string> AboutPaths() { |
1436 std::vector<std::string> paths; | 1437 std::vector<std::string> paths; |
1437 paths.reserve(arraysize(kAllAboutPaths)); | 1438 paths.reserve(arraysize(kAllAboutPaths)); |
1438 for (size_t i = 0; i < arraysize(kAllAboutPaths); i++) | 1439 for (size_t i = 0; i < arraysize(kAllAboutPaths); i++) |
1439 paths.push_back(kAllAboutPaths[i]); | 1440 paths.push_back(kAllAboutPaths[i]); |
1440 return paths; | 1441 return paths; |
1441 } | 1442 } |
OLD | NEW |