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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 242613004: Replace NOTIFICATION_EXTENSION_LOADED to NOTIFICATION_EXTENSION_LOADED_DEPRECATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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 "chrome/browser/ui/webui/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/app_restore_service.h" 8 #include "apps/app_restore_service.h"
9 #include "apps/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 MaybeUpdateAfterNotification(); 651 MaybeUpdateAfterNotification();
652 break; 652 break;
653 } 653 }
654 case chrome::NOTIFICATION_EXTENSION_LOAD_RETRY: { 654 case chrome::NOTIFICATION_EXTENSION_LOAD_RETRY: {
655 std::pair<bool, const base::FilePath&>* retry_and_path = 655 std::pair<bool, const base::FilePath&>* retry_and_path =
656 content::Details<std::pair<bool, const base::FilePath&> >(details) 656 content::Details<std::pair<bool, const base::FilePath&> >(details)
657 .ptr(); 657 .ptr();
658 HandleLoadRetryMessage(retry_and_path->first, retry_and_path->second); 658 HandleLoadRetryMessage(retry_and_path->first, retry_and_path->second);
659 break; 659 break;
660 } 660 }
661 case chrome::NOTIFICATION_EXTENSION_LOADED: { 661 case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED: {
662 const base::FilePath& path = 662 const base::FilePath& path =
663 content::Details<const Extension>(details).ptr()->path(); 663 content::Details<const Extension>(details).ptr()->path();
664 if (IndexOfLoadingPath(path) != -1) 664 if (IndexOfLoadingPath(path) != -1)
665 RemoveLoadingPath(path); 665 RemoveLoadingPath(path);
666 // Fall through. 666 // Fall through.
667 } 667 }
668 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED: 668 case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
669 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 669 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
670 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED: 670 case chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED:
671 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED: 671 case chrome::NOTIFICATION_EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED:
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 } 1129 }
1130 1130
1131 void ExtensionSettingsHandler::MaybeRegisterForNotifications() { 1131 void ExtensionSettingsHandler::MaybeRegisterForNotifications() {
1132 if (registered_for_notifications_) 1132 if (registered_for_notifications_)
1133 return; 1133 return;
1134 1134
1135 registered_for_notifications_ = true; 1135 registered_for_notifications_ = true;
1136 Profile* profile = Profile::FromWebUI(web_ui()); 1136 Profile* profile = Profile::FromWebUI(web_ui());
1137 1137
1138 // Register for notifications that we need to reload the page. 1138 // Register for notifications that we need to reload the page.
1139 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 1139 registrar_.Add(this,
1140 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
1140 content::Source<Profile>(profile)); 1141 content::Source<Profile>(profile));
1141 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, 1142 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
1142 content::Source<Profile>(profile)); 1143 content::Source<Profile>(profile));
1143 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 1144 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
1144 content::Source<Profile>(profile)); 1145 content::Source<Profile>(profile));
1145 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, 1146 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
1146 content::Source<Profile>(profile)); 1147 content::Source<Profile>(profile));
1147 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 1148 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
1148 content::NotificationService::AllBrowserContextsAndSources()); 1149 content::NotificationService::AllBrowserContextsAndSources());
1149 registrar_.Add(this, 1150 registrar_.Add(this,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 const base::FilePath& path) { 1332 const base::FilePath& path) {
1332 if (IndexOfLoadingPath(path) == -1) 1333 if (IndexOfLoadingPath(path) == -1)
1333 return; // Not an extension we're tracking. 1334 return; // Not an extension we're tracking.
1334 if (retry) 1335 if (retry)
1335 LoadUnpackedExtension(path); 1336 LoadUnpackedExtension(path);
1336 else 1337 else
1337 RemoveLoadingPath(path); 1338 RemoveLoadingPath(path);
1338 } 1339 }
1339 1340
1340 } // namespace extensions 1341 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/extensions/command_handler.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698