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

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

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review, Devlin review. Created 5 years 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/test_extension_registry_observer.h ('k') | extensions/common/constants.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 "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "extensions/browser/extension_registry.h" 8 #include "extensions/browser/extension_registry.h"
9 9
10 namespace extensions { 10 namespace extensions {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 const Extension* TestExtensionRegistryObserver::WaitForExtensionUnloaded() { 70 const Extension* TestExtensionRegistryObserver::WaitForExtensionUnloaded() {
71 return Wait(&unloaded_waiter_); 71 return Wait(&unloaded_waiter_);
72 } 72 }
73 73
74 void TestExtensionRegistryObserver::OnExtensionWillBeInstalled( 74 void TestExtensionRegistryObserver::OnExtensionWillBeInstalled(
75 content::BrowserContext* browser_context, 75 content::BrowserContext* browser_context,
76 const Extension* extension, 76 const Extension* extension,
77 bool is_update, 77 bool is_update,
78 bool from_ephemeral,
79 const std::string& old_name) { 78 const std::string& old_name) {
80 if (extension_id_.empty() || extension->id() == extension_id_) 79 if (extension_id_.empty() || extension->id() == extension_id_)
81 will_be_installed_waiter_->OnObserved(extension); 80 will_be_installed_waiter_->OnObserved(extension);
82 } 81 }
83 82
84 void TestExtensionRegistryObserver::OnExtensionUninstalled( 83 void TestExtensionRegistryObserver::OnExtensionUninstalled(
85 content::BrowserContext* browser_context, 84 content::BrowserContext* browser_context,
86 const Extension* extension, 85 const Extension* extension,
87 extensions::UninstallReason reason) { 86 extensions::UninstallReason reason) {
88 if (extension_id_.empty() || extension->id() == extension_id_) 87 if (extension_id_.empty() || extension->id() == extension_id_)
(...skipping 20 matching lines...) Expand all
109 waiter->get()->Wait(); 108 waiter->get()->Wait();
110 const Extension* extension = waiter->get()->extension(); 109 const Extension* extension = waiter->get()->extension();
111 // Reset the waiter for future uses. 110 // Reset the waiter for future uses.
112 // We could have a Waiter::Reset method, but it would reset every field in the 111 // We could have a Waiter::Reset method, but it would reset every field in the
113 // class, so let's just reset the pointer. 112 // class, so let's just reset the pointer.
114 waiter->reset(new Waiter()); 113 waiter->reset(new Waiter());
115 return extension; 114 return extension;
116 } 115 }
117 116
118 } // namespace extensions 117 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/test_extension_registry_observer.h ('k') | extensions/common/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698