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

Side by Side Diff: chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/api/braille_display_private/braille_controll er_brlapi.h" 5 #include "chrome/browser/extensions/api/braille_display_private/braille_controll er_brlapi.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cerrno> 8 #include <cerrno>
9 #include <cstring> 9 #include <cstring>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 BrailleController::~BrailleController() { 39 BrailleController::~BrailleController() {
40 } 40 }
41 41
42 // static 42 // static
43 BrailleController* BrailleController::GetInstance() { 43 BrailleController* BrailleController::GetInstance() {
44 return BrailleControllerImpl::GetInstance(); 44 return BrailleControllerImpl::GetInstance();
45 } 45 }
46 46
47 // static 47 // static
48 BrailleControllerImpl* BrailleControllerImpl::GetInstance() { 48 BrailleControllerImpl* BrailleControllerImpl::GetInstance() {
49 return Singleton<BrailleControllerImpl, 49 return base::Singleton<
50 LeakySingletonTraits<BrailleControllerImpl> >::get(); 50 BrailleControllerImpl,
51 base::LeakySingletonTraits<BrailleControllerImpl>>::get();
51 } 52 }
52 53
53 BrailleControllerImpl::BrailleControllerImpl() 54 BrailleControllerImpl::BrailleControllerImpl()
54 : started_connecting_(false), 55 : started_connecting_(false),
55 connect_scheduled_(false) { 56 connect_scheduled_(false) {
56 create_brlapi_connection_function_ = base::Bind( 57 create_brlapi_connection_function_ = base::Bind(
57 &BrailleControllerImpl::CreateBrlapiConnection, 58 &BrailleControllerImpl::CreateBrlapiConnection,
58 base::Unretained(this)); 59 base::Unretained(this));
59 } 60 }
60 61
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 } 314 }
314 return; 315 return;
315 } 316 }
316 FOR_EACH_OBSERVER(BrailleObserver, observers_, 317 FOR_EACH_OBSERVER(BrailleObserver, observers_,
317 OnBrailleDisplayStateChanged(*new_state)); 318 OnBrailleDisplayStateChanged(*new_state));
318 } 319 }
319 320
320 } // namespace braille_display_private 321 } // namespace braille_display_private
321 } // namespace api 322 } // namespace api
322 } // namespace extensions 323 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698