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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc

Issue 23588009: Parse /etc/lsb-release only once on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/extensions/file_manager/private_api_strings.h" 5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_strings.h"
6 6
7 #include "base/sys_info.h"
7 #include "chrome/browser/chromeos/file_manager/open_with_browser.h" 8 #include "chrome/browser/chromeos/file_manager/open_with_browser.h"
8 #include "chrome/browser/chromeos/system/statistics_provider.h"
9 #include "chrome/common/extensions/extension_l10n_util.h" 9 #include "chrome/common/extensions/extension_l10n_util.h"
10 #include "grit/app_locale_settings.h" 10 #include "grit/app_locale_settings.h"
11 #include "grit/generated_resources.h" 11 #include "grit/generated_resources.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 #include "ui/webui/web_ui_util.h" 13 #include "ui/webui/web_ui_util.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 FileBrowserPrivateGetStringsFunction::FileBrowserPrivateGetStringsFunction() { 17 FileBrowserPrivateGetStringsFunction::FileBrowserPrivateGetStringsFunction() {
18 } 18 }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 509
510 dict->SetBoolean("PDF_VIEW_ENABLED", 510 dict->SetBoolean("PDF_VIEW_ENABLED",
511 file_manager::util::ShouldBeOpenedWithPlugin(profile(), 511 file_manager::util::ShouldBeOpenedWithPlugin(profile(),
512 FILE_PATH_LITERAL(".pdf"))); 512 FILE_PATH_LITERAL(".pdf")));
513 dict->SetBoolean("SWF_VIEW_ENABLED", 513 dict->SetBoolean("SWF_VIEW_ENABLED",
514 file_manager::util::ShouldBeOpenedWithPlugin(profile(), 514 file_manager::util::ShouldBeOpenedWithPlugin(profile(),
515 FILE_PATH_LITERAL(".swf"))); 515 FILE_PATH_LITERAL(".swf")));
516 516
517 webui::SetFontAndTextDirection(dict); 517 webui::SetFontAndTextDirection(dict);
518 518
519 std::string board; 519 dict->SetString("CHROMEOS_RELEASE_BOARD",
520 chromeos::system::StatisticsProvider* provider = 520 base::SysInfo::GetLsbReleaseBoard());
521 chromeos::system::StatisticsProvider::GetInstance();
522 if (!provider->GetMachineStatistic(chromeos::system::kMachineInfoBoard,
523 &board)) {
524 board = "unknown";
525 }
526 dict->SetString(chromeos::system::kMachineInfoBoard, board);
527 521
528 dict->SetString("UI_LOCALE", extension_l10n_util::CurrentLocaleOrDefault()); 522 dict->SetString("UI_LOCALE", extension_l10n_util::CurrentLocaleOrDefault());
529 523
530 return true; 524 return true;
531 } 525 }
532 526
533 } // namespace extensions 527 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/extensions/info_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698