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

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

Issue 11636050: Eliminate ApiResourceEventNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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"
7 6
8 namespace extensions { 7 namespace extensions {
9 8
10 ApiResource::ApiResource(const std::string& owner_extension_id, 9 ApiResource::ApiResource(const std::string& owner_extension_id)
11 ApiResourceEventNotifier* event_notifier) 10 : owner_extension_id_(owner_extension_id) {
12 : owner_extension_id_(owner_extension_id),
13 event_notifier_(event_notifier) {
14 11
15 CHECK(!owner_extension_id_.empty()); 12 CHECK(!owner_extension_id_.empty());
16 if (event_notifier)
17 CHECK(event_notifier->src_extension_id() == owner_extension_id_);
18
19 // scoped_refptr<> constructor does the initial AddRef() for us on
20 // event_notifier_.
21 } 13 }
22 14
23 ApiResource::~ApiResource() { 15 ApiResource::~ApiResource() {
24 // scoped_refptr<> constructor calls Release() for us on event_notifier_.
25 } 16 }
26 17
27 } 18 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/api_resource.h ('k') | chrome/browser/extensions/api/api_resource_event_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698