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

Side by Side Diff: extensions/browser/test_extension_registry_observer.cc

Issue 563263002: Cleanup: cpplint from /extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « extensions/browser/script_executor.h ('k') | extensions/browser/test_runtime_api_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/test_extension_registry_observer.h" 5 #include "extensions/browser/test_extension_registry_observer.h"
6 6
7 #include "content/public/test/test_utils.h" 7 #include "content/public/test/test_utils.h"
8 #include "extensions/browser/extension_registry.h" 8 #include "extensions/browser/extension_registry.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 11
12 class TestExtensionRegistryObserver::Waiter { 12 class TestExtensionRegistryObserver::Waiter {
13 public: 13 public:
14 Waiter(const std::string& extension_id) : observed_(false), runner_(NULL) {} 14 explicit Waiter(const std::string& extension_id)
15 : observed_(false), runner_(NULL) {}
15 16
16 void Wait() { 17 void Wait() {
17 if (observed_) 18 if (observed_)
18 return; 19 return;
19 20
20 runner_ = new content::MessageLoopRunner(); 21 runner_ = new content::MessageLoopRunner();
21 runner_->Run(); 22 runner_->Run();
22 } 23 }
23 24
24 void OnObserved() { 25 void OnObserved() {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 void TestExtensionRegistryObserver::OnExtensionUnloaded( 97 void TestExtensionRegistryObserver::OnExtensionUnloaded(
97 content::BrowserContext* browser_context, 98 content::BrowserContext* browser_context,
98 const Extension* extension, 99 const Extension* extension,
99 UnloadedExtensionInfo::Reason reason) { 100 UnloadedExtensionInfo::Reason reason) {
100 if (extension->id() == extension_id_) 101 if (extension->id() == extension_id_)
101 unloaded_waiter_->OnObserved(); 102 unloaded_waiter_->OnObserved();
102 } 103 }
103 104
104 } // namespace extensions 105 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/script_executor.h ('k') | extensions/browser/test_runtime_api_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698