| 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/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 received_notification_ = true; | 65 received_notification_ = true; |
| 66 UpdatedExtensionPermissionsInfo* info = | 66 UpdatedExtensionPermissionsInfo* info = |
| 67 content::Details<UpdatedExtensionPermissionsInfo>(details).ptr(); | 67 content::Details<UpdatedExtensionPermissionsInfo>(details).ptr(); |
| 68 | 68 |
| 69 extension_ = info->extension; | 69 extension_ = info->extension; |
| 70 permissions_ = info->permissions; | 70 permissions_ = info->permissions; |
| 71 reason_ = info->reason; | 71 reason_ = info->reason; |
| 72 | 72 |
| 73 if (waiting_) { | 73 if (waiting_) { |
| 74 waiting_ = false; | 74 waiting_ = false; |
| 75 MessageLoopForUI::current()->Quit(); | 75 base::MessageLoopForUI::current()->Quit(); |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 bool received_notification_; | 79 bool received_notification_; |
| 80 bool waiting_; | 80 bool waiting_; |
| 81 content::NotificationRegistrar registrar_; | 81 content::NotificationRegistrar registrar_; |
| 82 scoped_refptr<const Extension> extension_; | 82 scoped_refptr<const Extension> extension_; |
| 83 scoped_refptr<const PermissionSet> permissions_; | 83 scoped_refptr<const PermissionSet> permissions_; |
| 84 UpdatedExtensionPermissionsInfo::Reason reason_; | 84 UpdatedExtensionPermissionsInfo::Reason reason_; |
| 85 }; | 85 }; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // Verify that the extension prefs hold the new active permissions and the | 202 // Verify that the extension prefs hold the new active permissions and the |
| 203 // same granted permissions. | 203 // same granted permissions. |
| 204 from_prefs = prefs->GetActivePermissions(extension->id()); | 204 from_prefs = prefs->GetActivePermissions(extension->id()); |
| 205 ASSERT_EQ(*active_permissions, *from_prefs); | 205 ASSERT_EQ(*active_permissions, *from_prefs); |
| 206 | 206 |
| 207 from_prefs = prefs->GetGrantedPermissions(extension->id()); | 207 from_prefs = prefs->GetGrantedPermissions(extension->id()); |
| 208 ASSERT_EQ(*granted_permissions, *from_prefs); | 208 ASSERT_EQ(*granted_permissions, *from_prefs); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace extensions | 211 } // namespace extensions |
| OLD | NEW |