| OLD | NEW |
| 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 "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/json/json_file_value_serializer.h" | 6 #include "base/json/json_file_value_serializer.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 received_notification_ = true; | 154 received_notification_ = true; |
| 155 UpdatedExtensionPermissionsInfo* info = | 155 UpdatedExtensionPermissionsInfo* info = |
| 156 content::Details<UpdatedExtensionPermissionsInfo>(details).ptr(); | 156 content::Details<UpdatedExtensionPermissionsInfo>(details).ptr(); |
| 157 | 157 |
| 158 extension_ = info->extension; | 158 extension_ = info->extension; |
| 159 permissions_ = info->permissions.Clone(); | 159 permissions_ = info->permissions.Clone(); |
| 160 reason_ = info->reason; | 160 reason_ = info->reason; |
| 161 | 161 |
| 162 if (waiting_) { | 162 if (waiting_) { |
| 163 waiting_ = false; | 163 waiting_ = false; |
| 164 base::MessageLoopForUI::current()->Quit(); | 164 base::MessageLoopForUI::current()->QuitWhenIdle(); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 bool received_notification_; | 168 bool received_notification_; |
| 169 bool waiting_; | 169 bool waiting_; |
| 170 content::NotificationRegistrar registrar_; | 170 content::NotificationRegistrar registrar_; |
| 171 scoped_refptr<const Extension> extension_; | 171 scoped_refptr<const Extension> extension_; |
| 172 scoped_ptr<const PermissionSet> permissions_; | 172 scoped_ptr<const PermissionSet> permissions_; |
| 173 UpdatedExtensionPermissionsInfo::Reason reason_; | 173 UpdatedExtensionPermissionsInfo::Reason reason_; |
| 174 }; | 174 }; |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 ->active_permissions() | 612 ->active_permissions() |
| 613 .HasExplicitAccessToOrigin(kOrigin)); | 613 .HasExplicitAccessToOrigin(kOrigin)); |
| 614 EXPECT_TRUE(extension->permissions_data() | 614 EXPECT_TRUE(extension->permissions_data() |
| 615 ->withheld_permissions() | 615 ->withheld_permissions() |
| 616 .HasExplicitAccessToOrigin(kOrigin)); | 616 .HasExplicitAccessToOrigin(kOrigin)); |
| 617 EXPECT_TRUE(updater.GetRevokablePermissions(extension.get())->IsEmpty()); | 617 EXPECT_TRUE(updater.GetRevokablePermissions(extension.get())->IsEmpty()); |
| 618 } | 618 } |
| 619 } | 619 } |
| 620 | 620 |
| 621 } // namespace extensions | 621 } // namespace extensions |
| OLD | NEW |