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

Side by Side Diff: chrome/browser/undo/bookmark_undo_service_factory.cc

Issue 19287013: Bookmark Undo service for multiple level undo/redo of bookmarks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
(Empty)
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.
4
5 #include "chrome/browser/undo/bookmark_undo_service_factory.h"
6
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/browser_context_keyed_service/browser_context_dependency_ma nager.h"
11
12 // static
13 BookmarkUndoService* BookmarkUndoServiceFactory::GetForProfile(
14 Profile* profile) {
15 return static_cast<BookmarkUndoService*>(
16 GetInstance()->GetServiceForBrowserContext(profile, true));
17 }
18
19 // static
20 BookmarkUndoServiceFactory* BookmarkUndoServiceFactory::GetInstance() {
21 return Singleton<BookmarkUndoServiceFactory>::get();
22 }
23
24 BookmarkUndoServiceFactory::BookmarkUndoServiceFactory()
25 : BrowserContextKeyedServiceFactory(
26 "BookmarkUndoService",
27 BrowserContextDependencyManager::GetInstance()) {
28 DependsOn(BookmarkModelFactory::GetInstance());
29 }
30
31 BookmarkUndoServiceFactory::~BookmarkUndoServiceFactory() {
32 }
33
34 BrowserContextKeyedService* BookmarkUndoServiceFactory::BuildServiceInstanceFor(
35 content::BrowserContext* context) const {
36 Profile* profile = static_cast<Profile*>(context);
37 return new BookmarkUndoService(profile);
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698