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

Side by Side Diff: chrome/browser/task_management/providers/web_contents/web_contents_tags_manager.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/task_management/providers/web_contents/web_contents_tag s_manager.h" 5 #include "chrome/browser/task_management/providers/web_contents/web_contents_tag s_manager.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/task_management/providers/web_contents/web_contents_tas k_provider.h" 8 #include "chrome/browser/task_management/providers/web_contents/web_contents_tas k_provider.h"
9 9
10 namespace task_management { 10 namespace task_management {
11 11
12 // static 12 // static
13 WebContentsTagsManager* WebContentsTagsManager::GetInstance() { 13 WebContentsTagsManager* WebContentsTagsManager::GetInstance() {
14 return Singleton<WebContentsTagsManager>::get(); 14 return base::Singleton<WebContentsTagsManager>::get();
15 } 15 }
16 16
17 void WebContentsTagsManager::AddTag(WebContentsTag* tag) { 17 void WebContentsTagsManager::AddTag(WebContentsTag* tag) {
18 DCHECK(tag); 18 DCHECK(tag);
19 tracked_tags_.push_back(tag); 19 tracked_tags_.push_back(tag);
20 20
21 if (provider_) 21 if (provider_)
22 provider_->OnWebContentsTagCreated(tag); 22 provider_->OnWebContentsTagCreated(tag);
23 } 23 }
24 24
(...skipping 30 matching lines...) Expand all
55 } 55 }
56 56
57 WebContentsTagsManager::WebContentsTagsManager() 57 WebContentsTagsManager::WebContentsTagsManager()
58 : provider_(nullptr) { 58 : provider_(nullptr) {
59 } 59 }
60 60
61 WebContentsTagsManager::~WebContentsTagsManager() { 61 WebContentsTagsManager::~WebContentsTagsManager() {
62 } 62 }
63 63
64 } // namespace task_management 64 } // namespace task_management
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698