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 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 source_->FinishDataRequest(template_html, request_id_); | 1232 source_->FinishDataRequest(template_html, request_id_); |
1233 } | 1233 } |
1234 | 1234 |
1235 #if defined(OS_CHROMEOS) | 1235 #if defined(OS_CHROMEOS) |
1236 // ChromeOSAboutVersionHandler ----------------------------------------------- | 1236 // ChromeOSAboutVersionHandler ----------------------------------------------- |
1237 | 1237 |
1238 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler(AboutSource* source, | 1238 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler(AboutSource* source, |
1239 int request_id) | 1239 int request_id) |
1240 : source_(source), | 1240 : source_(source), |
1241 request_id_(request_id) { | 1241 request_id_(request_id) { |
1242 loader_.EnablePlatformVersions(true); | |
1243 loader_.GetVersion(&consumer_, | 1242 loader_.GetVersion(&consumer_, |
1244 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), | 1243 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), |
1245 chromeos::VersionLoader::VERSION_FULL); | 1244 chromeos::VersionLoader::VERSION_FULL); |
1246 } | 1245 } |
1247 | 1246 |
1248 void ChromeOSAboutVersionHandler::OnVersion( | 1247 void ChromeOSAboutVersionHandler::OnVersion( |
1249 chromeos::VersionLoader::Handle handle, | 1248 chromeos::VersionLoader::Handle handle, |
1250 std::string version) { | 1249 std::string version) { |
1251 DictionaryValue localized_strings; | 1250 DictionaryValue localized_strings; |
1252 localized_strings.SetString("os_version", version); | 1251 localized_strings.SetString("os_version", version); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 return false; | 1335 return false; |
1337 } | 1336 } |
1338 | 1337 |
1339 std::vector<std::string> ChromePaths() { | 1338 std::vector<std::string> ChromePaths() { |
1340 std::vector<std::string> paths; | 1339 std::vector<std::string> paths; |
1341 paths.reserve(arraysize(kChromePaths)); | 1340 paths.reserve(arraysize(kChromePaths)); |
1342 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1341 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
1343 paths.push_back(kChromePaths[i]); | 1342 paths.push_back(kChromePaths[i]); |
1344 return paths; | 1343 return paths; |
1345 } | 1344 } |
OLD | NEW |