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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_external_updater.cc

Issue 1123723002: [chrome/browser/chromeos] ui::ResourceBundle::GetSharedInstance should return a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/app_mode/kiosk_external_updater.h" 5 #include "chrome/browser/chromeos/app_mode/kiosk_external_updater.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/json/json_file_value_serializer.h" 10 #include "base/json/json_file_value_serializer.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 const std::string& min_browser_version) { 368 const std::string& min_browser_version) {
369 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 369 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
370 370
371 std::string existing_version_str; 371 std::string existing_version_str;
372 base::FilePath existing_path; 372 base::FilePath existing_path;
373 bool cached = KioskAppManager::Get()->GetCachedCrx( 373 bool cached = KioskAppManager::Get()->GetCachedCrx(
374 app_id, &existing_path, &existing_version_str); 374 app_id, &existing_path, &existing_version_str);
375 DCHECK(cached); 375 DCHECK(cached);
376 376
377 // Compare app version. 377 // Compare app version.
378 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 378 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
379 if (!ShouldUpdateForHigherVersion(existing_version_str, version, false)) { 379 if (!ShouldUpdateForHigherVersion(existing_version_str, version, false)) {
380 external_updates_[app_id].error = rb.GetLocalizedString( 380 external_updates_[app_id].error = rb->GetLocalizedString(
381 IDS_KIOSK_EXTERNAL_UPDATE_SAME_OR_LOWER_APP_VERSION); 381 IDS_KIOSK_EXTERNAL_UPDATE_SAME_OR_LOWER_APP_VERSION);
382 return false; 382 return false;
383 } 383 }
384 384
385 // Check minimum browser version. 385 // Check minimum browser version.
386 if (!min_browser_version.empty()) { 386 if (!min_browser_version.empty()) {
387 chrome::VersionInfo current_version_info; 387 chrome::VersionInfo current_version_info;
388 if (!ShouldUpdateForHigherVersion( 388 if (!ShouldUpdateForHigherVersion(
389 min_browser_version, current_version_info.Version(), true)) { 389 min_browser_version, current_version_info.Version(), true)) {
390 external_updates_[app_id].error = l10n_util::GetStringFUTF16( 390 external_updates_[app_id].error = l10n_util::GetStringFUTF16(
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 if (failed) { 525 if (failed) {
526 failed_app_msg = ui::ResourceBundle::GetSharedInstance().GetLocalizedString( 526 failed_app_msg = ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
527 IDS_KIOSK_EXTERNAL_UPDATE_FAILED_UPDATED_APPS) + 527 IDS_KIOSK_EXTERNAL_UPDATE_FAILED_UPDATED_APPS) +
528 base::ASCIIToUTF16("\n") + failed_apps; 528 base::ASCIIToUTF16("\n") + failed_apps;
529 message = message + base::ASCIIToUTF16("\n") + failed_app_msg; 529 message = message + base::ASCIIToUTF16("\n") + failed_app_msg;
530 } 530 }
531 return message; 531 return message;
532 } 532 }
533 533
534 } // namespace chromeos 534 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/network_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698