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

Side by Side Diff: chrome/browser/ui/google_now/google_now_service_factory.cc

Issue 11412291: Creating a skeleton for Google Now for Chrome implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final sky's comments. Created 8 years 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) 2012 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/ui/google_now/google_now_service_factory.h"
6
7 #include "base/memory/singleton.h"
8 #include "chrome/browser/profiles/profile_dependency_manager.h"
9 #include "chrome/browser/ui/google_now/google_now_service.h"
10
11 // static
12 GoogleNowService* GoogleNowServiceFactory::GetForProfile(Profile* profile) {
13 return static_cast<GoogleNowService*>(
14 GetInstance()->GetServiceForProfile(profile, true));
15 }
16
17 // static
18 GoogleNowServiceFactory* GoogleNowServiceFactory::GetInstance() {
19 return Singleton<GoogleNowServiceFactory>::get();
20 }
21
22 GoogleNowServiceFactory::GoogleNowServiceFactory()
23 : ProfileKeyedServiceFactory(
24 "GoogleNowService", ProfileDependencyManager::GetInstance()) {
25 }
26
27 bool GoogleNowServiceFactory::ServiceIsCreatedWithProfile() const {
28 return true;
29 }
30
31 ProfileKeyedService*
32 GoogleNowServiceFactory::BuildServiceInstanceFor(Profile* profile) const {
33 GoogleNowService* const google_now_service = new GoogleNowService(profile);
34 google_now_service->Init();
35 return google_now_service;
36 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/google_now/google_now_service_factory.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698