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

Side by Side Diff: chrome/browser/extensions/api/api_resource.cc

Issue 10777003: Refactor APIResourceController to ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge/antony/fix build. Created 8 years, 5 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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/extensions/api/api_resource.h" 5 #include "chrome/browser/extensions/api/api_resource.h"
6 #include "chrome/browser/extensions/api/api_resource_event_notifier.h" 6 #include "chrome/browser/extensions/api/api_resource_event_notifier.h"
7 7
8 namespace extensions { 8 namespace extensions {
9 9
10 APIResource::APIResource(APIResource::APIResourceType api_resource_type, 10 ApiResource::ApiResource(ApiResourceEventNotifier* event_notifier)
11 APIResourceEventNotifier* event_notifier) 11 : event_notifier_(event_notifier) {
12 : api_resource_type_(api_resource_type), event_notifier_(event_notifier) {
13 // scoped_refptr<> constructor does the initial AddRef() for us on 12 // scoped_refptr<> constructor does the initial AddRef() for us on
14 // event_notifier_. 13 // event_notifier_.
15 } 14 }
16 15
17 APIResource::~APIResource() { 16 ApiResource::~ApiResource() {
18 // scoped_refptr<> constructor calls Release() for us on event_notifier_. 17 // scoped_refptr<> constructor calls Release() for us on event_notifier_.
19 } 18 }
20 19
21 APIResource::APIResourceType APIResource::api_resource_type() const { 20 ApiResourceEventNotifier* ApiResource::event_notifier() const {
22 return api_resource_type_;
23 }
24
25 APIResourceEventNotifier* APIResource::event_notifier() const {
26 return event_notifier_.get(); 21 return event_notifier_.get();
27 } 22 }
28 23
29 } 24 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/api_resource.h ('k') | chrome/browser/extensions/api/api_resource_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698