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

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

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698