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

Side by Side Diff: ui/base/gtk/g_object_destructor_filo.cc

Issue 10795024: ui: Forward declare DefaultSingletonTraits in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 (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 "ui/base/gtk/g_object_destructor_filo.h" 5 #include "ui/base/gtk/g_object_destructor_filo.h"
6 6
7 #include <glib-object.h> 7 #include <glib-object.h>
8
8 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/singleton.h"
9 11
10 namespace ui { 12 namespace ui {
11 13
12 GObjectDestructorFILO::GObjectDestructorFILO() { 14 GObjectDestructorFILO::GObjectDestructorFILO() {
13 } 15 }
14 16
15 GObjectDestructorFILO::~GObjectDestructorFILO() { 17 GObjectDestructorFILO::~GObjectDestructorFILO() {
16 // Probably CHECK(handler_map_.empty()) would look natural here. But 18 // Probably CHECK(handler_map_.empty()) would look natural here. But
17 // some tests (some views_unittests) violate this assertion. 19 // some tests (some views_unittests) violate this assertion.
18 } 20 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 HandlerList dtors; 80 HandlerList dtors;
79 iter->second.swap(dtors); 81 iter->second.swap(dtors);
80 handler_map_.erase(iter); 82 handler_map_.erase(iter);
81 83
82 // Execute hooks in local list in FILO order. 84 // Execute hooks in local list in FILO order.
83 for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i) 85 for (HandlerList::iterator i = dtors.begin(); i != dtors.end(); ++i)
84 i->callback(i->context, where_the_object_was); 86 i->callback(i->context, where_the_object_was);
85 } 87 }
86 88
87 } // napespace ui 89 } // napespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698