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/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 else | 76 else |
77 screen->ExitUpdate(UpdateScreen::REASON_UPDATE_INIT_FAILED); | 77 screen->ExitUpdate(UpdateScreen::REASON_UPDATE_INIT_FAILED); |
78 } | 78 } |
79 } | 79 } |
80 | 80 |
81 } // anonymous namespace | 81 } // anonymous namespace |
82 | 82 |
83 // static | 83 // static |
84 UpdateScreen::InstanceSet& UpdateScreen::GetInstanceSet() { | 84 UpdateScreen::InstanceSet& UpdateScreen::GetInstanceSet() { |
85 CR_DEFINE_STATIC_LOCAL(std::set<UpdateScreen*>, instance_set, ()); | 85 CR_DEFINE_STATIC_LOCAL(std::set<UpdateScreen*>, instance_set, ()); |
86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // not threadsafe. | 86 DCHECK_CURRENTLY_ON(BrowserThread::UI); // not threadsafe. |
87 return instance_set; | 87 return instance_set; |
88 } | 88 } |
89 | 89 |
90 // static | 90 // static |
91 bool UpdateScreen::HasInstance(UpdateScreen* inst) { | 91 bool UpdateScreen::HasInstance(UpdateScreen* inst) { |
92 InstanceSet& instance_set = GetInstanceSet(); | 92 InstanceSet& instance_set = GetInstanceSet(); |
93 InstanceSet::iterator found = instance_set.find(inst); | 93 InstanceSet::iterator found = instance_set.find(inst); |
94 return (found != instance_set.end()); | 94 return (found != instance_set.end()); |
95 } | 95 } |
96 | 96 |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 } | 565 } |
566 | 566 |
567 void UpdateScreen::SetHostPairingControllerStatus( | 567 void UpdateScreen::SetHostPairingControllerStatus( |
568 HostPairingController::UpdateStatus update_status) { | 568 HostPairingController::UpdateStatus update_status) { |
569 if (remora_controller_) { | 569 if (remora_controller_) { |
570 remora_controller_->OnUpdateStatusChanged(update_status); | 570 remora_controller_->OnUpdateStatusChanged(update_status); |
571 } | 571 } |
572 } | 572 } |
573 | 573 |
574 } // namespace chromeos | 574 } // namespace chromeos |
OLD | NEW |