| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/login/screens/update_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/update_screen.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 | 453 |
| 454 bool UpdateScreen::HasCriticalUpdate() { | 454 bool UpdateScreen::HasCriticalUpdate() { |
| 455 if (is_ignore_update_deadlines_) | 455 if (is_ignore_update_deadlines_) |
| 456 return true; | 456 return true; |
| 457 | 457 |
| 458 std::string deadline; | 458 std::string deadline; |
| 459 // Checking for update flag file causes us to do blocking IO on UI thread. | 459 // Checking for update flag file causes us to do blocking IO on UI thread. |
| 460 // Temporarily allow it until we fix http://crosbug.com/11106 | 460 // Temporarily allow it until we fix http://crosbug.com/11106 |
| 461 base::ThreadRestrictions::ScopedAllowIO allow_io; | 461 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 462 base::FilePath update_deadline_file_path(kUpdateDeadlineFile); | 462 base::FilePath update_deadline_file_path(kUpdateDeadlineFile); |
| 463 if (!file_util::ReadFileToString(update_deadline_file_path, &deadline) || | 463 if (!base::ReadFileToString(update_deadline_file_path, &deadline) || |
| 464 deadline.empty()) { | 464 deadline.empty()) { |
| 465 return false; | 465 return false; |
| 466 } | 466 } |
| 467 | 467 |
| 468 // TODO(dpolukhin): Analyze file content. Now we can just assume that | 468 // TODO(dpolukhin): Analyze file content. Now we can just assume that |
| 469 // if the file exists and not empty, there is critical update. | 469 // if the file exists and not empty, there is critical update. |
| 470 return true; | 470 return true; |
| 471 } | 471 } |
| 472 | 472 |
| 473 void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) { | 473 void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, | 537 GetErrorScreen()->SetErrorState(ErrorScreen::ERROR_STATE_PROXY, |
| 538 std::string()); | 538 std::string()); |
| 539 break; | 539 break; |
| 540 default: | 540 default: |
| 541 NOTREACHED(); | 541 NOTREACHED(); |
| 542 break; | 542 break; |
| 543 } | 543 } |
| 544 } | 544 } |
| 545 | 545 |
| 546 } // namespace chromeos | 546 } // namespace chromeos |
| OLD | NEW |