Give names to all utility processes.
[chromium-blink-merge.git] / chrome / browser / undo / bookmark_undo_service_factory.cc
blob1359a027a9b86edc87e6b02c13938aca0c5e795b
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
3 // found in the LICENSE file.
5 #include "chrome/browser/undo/bookmark_undo_service_factory.h"
7 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/undo/bookmark_undo_service.h"
10 #include "components/keyed_service/content/browser_context_dependency_manager.h"
12 // static
13 BookmarkUndoService* BookmarkUndoServiceFactory::GetForProfile(
14 Profile* profile) {
15 return static_cast<BookmarkUndoService*>(
16 GetInstance()->GetServiceForBrowserContext(profile, true));
19 // static
20 BookmarkUndoServiceFactory* BookmarkUndoServiceFactory::GetInstance() {
21 return Singleton<BookmarkUndoServiceFactory>::get();
24 BookmarkUndoServiceFactory::BookmarkUndoServiceFactory()
25 : BrowserContextKeyedServiceFactory(
26 "BookmarkUndoService",
27 BrowserContextDependencyManager::GetInstance()) {
28 DependsOn(BookmarkModelFactory::GetInstance());
31 BookmarkUndoServiceFactory::~BookmarkUndoServiceFactory() {
34 KeyedService* BookmarkUndoServiceFactory::BuildServiceInstanceFor(
35 content::BrowserContext* context) const {
36 Profile* profile = static_cast<Profile*>(context);
37 return new BookmarkUndoService(profile);