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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1245 source_->FinishDataRequest(template_html, request_id_); | 1245 source_->FinishDataRequest(template_html, request_id_); |
1246 } | 1246 } |
1247 | 1247 |
1248 #if defined(OS_CHROMEOS) | 1248 #if defined(OS_CHROMEOS) |
1249 // ChromeOSAboutVersionHandler ----------------------------------------------- | 1249 // ChromeOSAboutVersionHandler ----------------------------------------------- |
1250 | 1250 |
1251 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler(AboutSource* source, | 1251 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler(AboutSource* source, |
1252 int request_id) | 1252 int request_id) |
1253 : source_(source), | 1253 : source_(source), |
1254 request_id_(request_id) { | 1254 request_id_(request_id) { |
| 1255 loader_.EnablePlatformVersions(true); |
1255 loader_.GetVersion(&consumer_, | 1256 loader_.GetVersion(&consumer_, |
1256 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), | 1257 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), |
1257 chromeos::VersionLoader::VERSION_FULL); | 1258 chromeos::VersionLoader::VERSION_FULL); |
1258 } | 1259 } |
1259 | 1260 |
1260 void ChromeOSAboutVersionHandler::OnVersion( | 1261 void ChromeOSAboutVersionHandler::OnVersion( |
1261 chromeos::VersionLoader::Handle handle, | 1262 chromeos::VersionLoader::Handle handle, |
1262 std::string version) { | 1263 std::string version) { |
1263 DictionaryValue localized_strings; | 1264 DictionaryValue localized_strings; |
1264 localized_strings.SetString("os_version", version); | 1265 localized_strings.SetString("os_version", version); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 return false; | 1430 return false; |
1430 } | 1431 } |
1431 | 1432 |
1432 std::vector<std::string> AboutPaths() { | 1433 std::vector<std::string> AboutPaths() { |
1433 std::vector<std::string> paths; | 1434 std::vector<std::string> paths; |
1434 paths.reserve(arraysize(kAllAboutPaths)); | 1435 paths.reserve(arraysize(kAllAboutPaths)); |
1435 for (size_t i = 0; i < arraysize(kAllAboutPaths); i++) | 1436 for (size_t i = 0; i < arraysize(kAllAboutPaths); i++) |
1436 paths.push_back(kAllAboutPaths[i]); | 1437 paths.push_back(kAllAboutPaths[i]); |
1437 return paths; | 1438 return paths; |
1438 } | 1439 } |
OLD | NEW |