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

Side by Side Diff: base/global_descriptors_posix.cc

Issue 8368009: Replace most LOG statements with DLOG statements in base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « base/files/file_path_watcher_win.cc ('k') | base/i18n/icu_util.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/global_descriptors_posix.h" 5 #include "base/global_descriptors_posix.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 11
12 namespace base { 12 namespace base {
13 13
14 // static 14 // static
15 GlobalDescriptors* GlobalDescriptors::GetInstance() { 15 GlobalDescriptors* GlobalDescriptors::GetInstance() {
16 typedef Singleton<base::GlobalDescriptors, 16 typedef Singleton<base::GlobalDescriptors,
17 LeakySingletonTraits<base::GlobalDescriptors> > 17 LeakySingletonTraits<base::GlobalDescriptors> >
18 GlobalDescriptorsSingleton; 18 GlobalDescriptorsSingleton;
19 return GlobalDescriptorsSingleton::get(); 19 return GlobalDescriptorsSingleton::get();
20 } 20 }
21 21
22 int GlobalDescriptors::Get(Key key) const { 22 int GlobalDescriptors::Get(Key key) const {
23 const int ret = MaybeGet(key); 23 const int ret = MaybeGet(key);
24 24
25 if (ret == -1) 25 if (ret == -1)
26 LOG(FATAL) << "Unknown global descriptor: " << key; 26 DLOG(FATAL) << "Unknown global descriptor: " << key;
27 return ret; 27 return ret;
28 } 28 }
29 29
30 int GlobalDescriptors::MaybeGet(Key key) const { 30 int GlobalDescriptors::MaybeGet(Key key) const {
31 for (Mapping::const_iterator 31 for (Mapping::const_iterator
32 i = descriptors_.begin(); i != descriptors_.end(); ++i) { 32 i = descriptors_.begin(); i != descriptors_.end(); ++i) {
33 if (i->first == key) 33 if (i->first == key)
34 return i->second; 34 return i->second;
35 } 35 }
36 36
(...skipping 16 matching lines...) Expand all
53 53
54 void GlobalDescriptors::Reset(const Mapping& mapping) { 54 void GlobalDescriptors::Reset(const Mapping& mapping) {
55 descriptors_ = mapping; 55 descriptors_ = mapping;
56 } 56 }
57 57
58 GlobalDescriptors::GlobalDescriptors() {} 58 GlobalDescriptors::GlobalDescriptors() {}
59 59
60 GlobalDescriptors::~GlobalDescriptors() {} 60 GlobalDescriptors::~GlobalDescriptors() {}
61 61
62 } // namespace base 62 } // namespace base
OLDNEW
« no previous file with comments | « base/files/file_path_watcher_win.cc ('k') | base/i18n/icu_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698