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/browser/extensions/active_tab_permission_granter.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on 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/browser/extensions/active_tab_permission_granter.h" 5 #include "chrome/browser/extensions/active_tab_permission_granter.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/session_id.h" 10 #include "chrome/browser/sessions/session_id.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 void ActiveTabPermissionGranter::ClearActiveExtensionsAndNotify() { 102 void ActiveTabPermissionGranter::ClearActiveExtensionsAndNotify() {
103 if (granted_extensions_.is_empty()) 103 if (granted_extensions_.is_empty())
104 return; 104 return;
105 105
106 std::vector<std::string> extension_ids; 106 std::vector<std::string> extension_ids;
107 107
108 for (ExtensionSet::const_iterator it = granted_extensions_.begin(); 108 for (ExtensionSet::const_iterator it = granted_extensions_.begin();
109 it != granted_extensions_.end(); ++it) { 109 it != granted_extensions_.end(); ++it) {
110 PermissionsData::ClearTabSpecificPermissions(*it, tab_id_); 110 PermissionsData::ClearTabSpecificPermissions(it->get(), tab_id_);
111 extension_ids.push_back((*it)->id()); 111 extension_ids.push_back((*it)->id());
112 } 112 }
113 113
114 Send(new ExtensionMsg_ClearTabSpecificPermissions(tab_id_, extension_ids)); 114 Send(new ExtensionMsg_ClearTabSpecificPermissions(tab_id_, extension_ids));
115 granted_extensions_.Clear(); 115 granted_extensions_.Clear();
116 } 116 }
117 117
118 int32 ActiveTabPermissionGranter::GetPageID() { 118 int32 ActiveTabPermissionGranter::GetPageID() {
119 return web_contents()->GetController().GetActiveEntry()->GetPageID(); 119 return web_contents()->GetController().GetActiveEntry()->GetPageID();
120 } 120 }
121 121
122 } // namespace extensions 122 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_window.cc ('k') | chrome/browser/extensions/activity_log/activity_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698