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

Side by Side Diff: components/app_modal/app_modal_dialog_queue.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 (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 "components/app_modal/app_modal_dialog_queue.h" 5 #include "components/app_modal/app_modal_dialog_queue.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "components/app_modal/app_modal_dialog.h" 8 #include "components/app_modal/app_modal_dialog.h"
9 9
10 namespace app_modal { 10 namespace app_modal {
11 11
12 // static 12 // static
13 AppModalDialogQueue* AppModalDialogQueue::GetInstance() { 13 AppModalDialogQueue* AppModalDialogQueue::GetInstance() {
14 return Singleton<AppModalDialogQueue>::get(); 14 return base::Singleton<AppModalDialogQueue>::get();
15 } 15 }
16 16
17 void AppModalDialogQueue::AddDialog(AppModalDialog* dialog) { 17 void AppModalDialogQueue::AddDialog(AppModalDialog* dialog) {
18 if (!active_dialog_) { 18 if (!active_dialog_) {
19 ShowModalDialog(dialog); 19 ShowModalDialog(dialog);
20 return; 20 return;
21 } 21 }
22 app_modal_dialog_queue_.push_back(dialog); 22 app_modal_dialog_queue_.push_back(dialog);
23 } 23 }
24 24
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 AppModalDialog* dialog = app_modal_dialog_queue_.front(); 71 AppModalDialog* dialog = app_modal_dialog_queue_.front();
72 app_modal_dialog_queue_.pop_front(); 72 app_modal_dialog_queue_.pop_front();
73 if (dialog->IsValid()) 73 if (dialog->IsValid())
74 return dialog; 74 return dialog;
75 delete dialog; 75 delete dialog;
76 } 76 }
77 return NULL; 77 return NULL;
78 } 78 }
79 79
80 } // namespace app_modal 80 } // namespace app_modal
OLDNEW
« no previous file with comments | « components/app_modal/app_modal_dialog_queue.h ('k') | components/app_modal/javascript_dialog_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698