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

Side by Side Diff: chrome/common/extensions/extension_messages.cc

Issue 15836003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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/common/extensions/extension_messages.h" 5 #include "chrome/common/extensions/extension_messages.h"
6 6
7 #include "chrome/common/extensions/extension.h" 7 #include "chrome/common/extensions/extension.h"
8 #include "chrome/common/extensions/extension_constants.h" 8 #include "chrome/common/extensions/extension_constants.h"
9 #include "chrome/common/extensions/manifest.h" 9 #include "chrome/common/extensions/manifest.h"
10 #include "chrome/common/extensions/permissions/permissions_data.h" 10 #include "chrome/common/extensions/permissions/permissions_data.h"
(...skipping 24 matching lines...) Expand all
35 explicit_hosts(extension->GetActivePermissions()->explicit_hosts()), 35 explicit_hosts(extension->GetActivePermissions()->explicit_hosts()),
36 scriptable_hosts(extension->GetActivePermissions()->scriptable_hosts()), 36 scriptable_hosts(extension->GetActivePermissions()->scriptable_hosts()),
37 id(extension->id()), 37 id(extension->id()),
38 creation_flags(extension->creation_flags()) { 38 creation_flags(extension->creation_flags()) {
39 } 39 }
40 40
41 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension( 41 scoped_refptr<Extension> ExtensionMsg_Loaded_Params::ConvertToExtension(
42 std::string* error) const { 42 std::string* error) const {
43 scoped_refptr<Extension> extension = 43 scoped_refptr<Extension> extension =
44 Extension::Create(path, location, *manifest, creation_flags, error); 44 Extension::Create(path, location, *manifest, creation_flags, error);
45 if (extension) { 45 if (extension.get()) {
46 extensions::PermissionsData::SetActivePermissions( 46 extensions::PermissionsData::SetActivePermissions(
47 extension, 47 extension.get(),
48 new PermissionSet(apis, explicit_hosts, scriptable_hosts)); 48 new PermissionSet(apis, explicit_hosts, scriptable_hosts));
49 } 49 }
50 return extension; 50 return extension;
51 } 51 }
52 52
53 namespace IPC { 53 namespace IPC {
54 54
55 template <> 55 template <>
56 struct ParamTraits<Manifest::Location> { 56 struct ParamTraits<Manifest::Location> {
57 typedef Manifest::Location param_type; 57 typedef Manifest::Location param_type;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 ReadParam(m, iter, &p->explicit_hosts) && 206 ReadParam(m, iter, &p->explicit_hosts) &&
207 ReadParam(m, iter, &p->scriptable_hosts); 207 ReadParam(m, iter, &p->scriptable_hosts);
208 } 208 }
209 209
210 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p, 210 void ParamTraits<ExtensionMsg_Loaded_Params>::Log(const param_type& p,
211 std::string* l) { 211 std::string* l) {
212 l->append(p.id); 212 l->append(p.id);
213 } 213 }
214 214
215 } // namespace IPC 215 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_file_util_unittest.cc ('k') | chrome/common/extensions/extension_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698