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

Side by Side Diff: extensions/common/extension_consumer.cc

Issue 885493007: Refactoring: de-couple Extensions from "script injection System" [render side] : 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Devlin@'s comments. Created 5 years, 10 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 2015 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 "extensions/common/extension_consumer.h"
6 #include "extensions/common/manifest_handlers/csp_info.h"
7
8 namespace extensions {
9
10 ExtensionConsumer::ExtensionConsumer(
11 const scoped_refptr<const Extension>& extension, const HostID& host_id)
12 : Host(host_id),
13 extension_(extension) {
14 }
15
16 ExtensionConsumer::~ExtensionConsumer() {
17 }
18
19 bool ExtensionConsumer::IsEmpty() const {
20 return extension_.get() == nullptr;
21 }
22
23 const std::string& ExtensionConsumer::GetContentSecurityPolicy() const {
24 return CSPInfo::GetContentSecurityPolicy(extension_.get());
25 }
26
27 const GURL& ExtensionConsumer::url() const {
28 DCHECK(extension_.get());
29 return extension_->url();
30 }
31
32 const std::string ExtensionConsumer::name() const {
33 DCHECK(extension_.get());
34 return extension_->name();
35 }
36
37 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698