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

Side by Side Diff: chrome/browser/chromeos/login/update_screen.cc

Issue 8609002: CrOs: Remove 16 exit time destructors and 11 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 (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/chromeos/login/update_screen.h" 5 #include "chrome/browser/chromeos/login/update_screen.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 screen->SetIgnoreIdleStatus(false); 50 screen->SetIgnoreIdleStatus(false);
51 else 51 else
52 screen->ExitUpdate(UpdateScreen::REASON_UPDATE_INIT_FAILED); 52 screen->ExitUpdate(UpdateScreen::REASON_UPDATE_INIT_FAILED);
53 } 53 }
54 } 54 }
55 55
56 } // anonymous namespace 56 } // anonymous namespace
57 57
58 // static 58 // static
59 UpdateScreen::InstanceSet& UpdateScreen::GetInstanceSet() { 59 UpdateScreen::InstanceSet& UpdateScreen::GetInstanceSet() {
60 static std::set<UpdateScreen*> instance_set; 60 CR_DEFINE_STATIC_LOCAL(std::set<UpdateScreen*>, instance_set, ());
61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // not threadsafe. 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // not threadsafe.
62 return instance_set; 62 return instance_set;
63 } 63 }
64 64
65 // static 65 // static
66 bool UpdateScreen::HasInstance(UpdateScreen* inst) { 66 bool UpdateScreen::HasInstance(UpdateScreen* inst) {
67 InstanceSet& instance_set = GetInstanceSet(); 67 InstanceSet& instance_set = GetInstanceSet();
68 InstanceSet::iterator found = instance_set.find(inst); 68 InstanceSet::iterator found = instance_set.find(inst);
69 return (found != instance_set.end()); 69 return (found != instance_set.end());
70 } 70 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // if the file exists and not empty, there is critical update. 293 // if the file exists and not empty, there is critical update.
294 return true; 294 return true;
295 } 295 }
296 296
297 void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) { 297 void UpdateScreen::OnActorDestroyed(UpdateScreenActor* actor) {
298 if (actor_ == actor) 298 if (actor_ == actor)
299 actor_ = NULL; 299 actor_ = NULL;
300 } 300 }
301 301
302 } // namespace chromeos 302 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/network_menu_icon.cc » ('j') | chrome/browser/ui/views/about_chrome_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698