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

Side by Side Diff: chrome/browser/intents/web_intents_registry_factory.cc

Issue 7601013: Web Intents: Hook up the register intent InfoBar with the WebIntentsRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing files. Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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/intents/web_intents_registry.h"
6 #include "chrome/browser/intents/web_intents_registry_factory.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9
10 // static
11 WebIntentsRegistry* WebIntentsRegistryFactory::GetForProfile(Profile* profile) {
12 return static_cast<WebIntentsRegistry*>(
13 GetInstance()->GetServiceForProfile(profile, true));
14 }
15
16 WebIntentsRegistryFactory::WebIntentsRegistryFactory()
17 : ProfileKeyedServiceFactory(ProfileDependencyManager::GetInstance()) {
Elliot Glaysher 2011/08/10 17:47:54 nit: Please add the following comment to remind me
James Hawkins 2011/08/11 20:49:07 Done.
18 }
19
20 WebIntentsRegistryFactory::~WebIntentsRegistryFactory() {
21 }
22
23 // static
24 WebIntentsRegistryFactory* WebIntentsRegistryFactory::GetInstance() {
25 return Singleton<WebIntentsRegistryFactory>::get();
26 }
27
28 ProfileKeyedService* WebIntentsRegistryFactory::BuildServiceInstanceFor(
29 Profile* profile) const {
30 WebIntentsRegistry* registry = new WebIntentsRegistry;
31 registry->Initialize(profile->GetWebDataService(Profile::EXPLICIT_ACCESS));
32 return registry;
33 }
34
35 bool WebIntentsRegistryFactory::ServiceRedirectedInIncognito() {
36 return false;
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698