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

Side by Side Diff: extensions/shell/test/shell_apitest.cc

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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/shell/browser/shell_extension_system.cc ('k') | no next file » | 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/shell/test/shell_apitest.h" 5 #include "extensions/shell/test/shell_apitest.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 return false; 49 return false;
50 } 50 }
51 51
52 return true; 52 return true;
53 } 53 }
54 54
55 void ShellApiTest::UnloadApp(const Extension* app) { 55 void ShellApiTest::UnloadApp(const Extension* app) {
56 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context()); 56 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context());
57 ASSERT_TRUE(registry->RemoveEnabled(app->id())); 57 ASSERT_TRUE(registry->RemoveEnabled(app->id()));
58 58
59 UnloadedExtensionInfo::Reason reason(UnloadedExtensionInfo::REASON_DISABLE); 59 UnloadedExtensionReason reason(UnloadedExtensionReason::DISABLE);
60 registry->TriggerOnUnloaded(app, reason); 60 registry->TriggerOnUnloaded(app, reason);
61 61
62 content::NotificationService::current()->Notify( 62 content::NotificationService::current()->Notify(
63 extensions::NOTIFICATION_EXTENSION_REMOVED, 63 extensions::NOTIFICATION_EXTENSION_REMOVED,
64 content::Source<content::BrowserContext>(browser_context()), 64 content::Source<content::BrowserContext>(browser_context()),
65 content::Details<const Extension>(app)); 65 content::Details<const Extension>(app));
66 } 66 }
67 67
68 } // namespace extensions 68 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_extension_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698