| 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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 #if defined(OS_CHROMEOS) | 1359 #if defined(OS_CHROMEOS) |
| 1360 // ChromeOSAboutVersionHandler ----------------------------------------------- | 1360 // ChromeOSAboutVersionHandler ----------------------------------------------- |
| 1361 | 1361 |
| 1362 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler( | 1362 ChromeOSAboutVersionHandler::ChromeOSAboutVersionHandler( |
| 1363 AboutSource* source, | 1363 AboutSource* source, |
| 1364 int request_id) | 1364 int request_id) |
| 1365 : source_(source), | 1365 : source_(source), |
| 1366 request_id_(request_id) { | 1366 request_id_(request_id) { |
| 1367 loader_.EnablePlatformVersions(true); | |
| 1368 loader_.GetVersion(&consumer_, | 1367 loader_.GetVersion(&consumer_, |
| 1369 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), | 1368 NewCallback(this, &ChromeOSAboutVersionHandler::OnVersion), |
| 1370 chromeos::VersionLoader::VERSION_FULL); | 1369 chromeos::VersionLoader::VERSION_FULL); |
| 1371 } | 1370 } |
| 1372 | 1371 |
| 1373 void ChromeOSAboutVersionHandler::OnVersion( | 1372 void ChromeOSAboutVersionHandler::OnVersion( |
| 1374 chromeos::VersionLoader::Handle handle, | 1373 chromeos::VersionLoader::Handle handle, |
| 1375 std::string version) { | 1374 std::string version) { |
| 1376 DictionaryValue localized_strings; | 1375 DictionaryValue localized_strings; |
| 1377 localized_strings.SetString("os_version", version); | 1376 localized_strings.SetString("os_version", version); |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 return false; | 1606 return false; |
| 1608 } | 1607 } |
| 1609 | 1608 |
| 1610 std::vector<std::string> ChromePaths() { | 1609 std::vector<std::string> ChromePaths() { |
| 1611 std::vector<std::string> paths; | 1610 std::vector<std::string> paths; |
| 1612 paths.reserve(arraysize(kChromePaths)); | 1611 paths.reserve(arraysize(kChromePaths)); |
| 1613 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1612 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 1614 paths.push_back(kChromePaths[i]); | 1613 paths.push_back(kChromePaths[i]); |
| 1615 return paths; | 1614 return paths; |
| 1616 } | 1615 } |
| OLD | NEW |