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

Side by Side Diff: chrome/browser/extensions/permissions_updater_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again 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 "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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 received_notification_ = true; 68 received_notification_ = true;
69 UpdatedExtensionPermissionsInfo* info = 69 UpdatedExtensionPermissionsInfo* info =
70 content::Details<UpdatedExtensionPermissionsInfo>(details).ptr(); 70 content::Details<UpdatedExtensionPermissionsInfo>(details).ptr();
71 71
72 extension_ = info->extension; 72 extension_ = info->extension;
73 permissions_ = info->permissions; 73 permissions_ = info->permissions;
74 reason_ = info->reason; 74 reason_ = info->reason;
75 75
76 if (waiting_) { 76 if (waiting_) {
77 waiting_ = false; 77 waiting_ = false;
78 MessageLoopForUI::current()->Quit(); 78 base::MessageLoopForUI::current()->Quit();
79 } 79 }
80 } 80 }
81 81
82 bool received_notification_; 82 bool received_notification_;
83 bool waiting_; 83 bool waiting_;
84 content::NotificationRegistrar registrar_; 84 content::NotificationRegistrar registrar_;
85 scoped_refptr<const Extension> extension_; 85 scoped_refptr<const Extension> extension_;
86 scoped_refptr<const PermissionSet> permissions_; 86 scoped_refptr<const PermissionSet> permissions_;
87 UpdatedExtensionPermissionsInfo::Reason reason_; 87 UpdatedExtensionPermissionsInfo::Reason reason_;
88 }; 88 };
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Verify that the extension prefs hold the new active permissions and the 195 // Verify that the extension prefs hold the new active permissions and the
196 // same granted permissions. 196 // same granted permissions.
197 from_prefs = prefs->GetActivePermissions(extension->id()); 197 from_prefs = prefs->GetActivePermissions(extension->id());
198 ASSERT_EQ(*active_permissions, *from_prefs); 198 ASSERT_EQ(*active_permissions, *from_prefs);
199 199
200 from_prefs = prefs->GetGrantedPermissions(extension->id()); 200 from_prefs = prefs->GetGrantedPermissions(extension->id());
201 ASSERT_EQ(*granted_permissions, *from_prefs); 201 ASSERT_EQ(*granted_permissions, *from_prefs);
202 } 202 }
203 203
204 } // namespace extensions 204 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/page_action_controller_unittest.cc ('k') | chrome/browser/extensions/sandboxed_unpacker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698