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

Side by Side Diff: chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.cc

Issue 10693128: chromeos: Show pending state for app update only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (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/views/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 switch (type) { 614 switch (type) {
615 case chrome::NOTIFICATION_EXTENSION_LOADED: { 615 case chrome::NOTIFICATION_EXTENSION_LOADED: {
616 UpdateAppLaunchersFromPref(); 616 UpdateAppLaunchersFromPref();
617 break; 617 break;
618 } 618 }
619 case chrome::NOTIFICATION_EXTENSION_UNLOADED: { 619 case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
620 const content::Details<extensions::UnloadedExtensionInfo> unload_info( 620 const content::Details<extensions::UnloadedExtensionInfo> unload_info(
621 details); 621 details);
622 const Extension* extension = unload_info->extension; 622 const Extension* extension = unload_info->extension;
623 if (IsAppPinned(extension->id())) { 623 if (IsAppPinned(extension->id())) {
624 if (unload_info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) 624 if (unload_info->reason == extension_misc::UNLOAD_REASON_UPDATE)
625 MarkAppPending(extension->id());
626 else
625 DoUnpinAppsWithID(extension->id()); 627 DoUnpinAppsWithID(extension->id());
626 else
627 MarkAppPending(extension->id());
628 } 628 }
629 break; 629 break;
630 } 630 }
631 case chrome::NOTIFICATION_PREF_CHANGED: { 631 case chrome::NOTIFICATION_PREF_CHANGED: {
632 const std::string& pref_name( 632 const std::string& pref_name(
633 *content::Details<std::string>(details).ptr()); 633 *content::Details<std::string>(details).ptr());
634 if (pref_name == prefs::kPinnedLauncherApps) { 634 if (pref_name == prefs::kPinnedLauncherApps) {
635 UpdateAppLaunchersFromPref(); 635 UpdateAppLaunchersFromPref();
636 } else { 636 } else {
637 NOTREACHED() << "Unexpected pref change for " << pref_name; 637 NOTREACHED() << "Unexpected pref change for " << pref_name;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 } 933 }
934 model_->AddAt(index, item); 934 model_->AddAt(index, item);
935 935
936 if (!controller || controller->type() != 936 if (!controller || controller->type() !=
937 BrowserLauncherItemController::TYPE_EXTENSION_PANEL) { 937 BrowserLauncherItemController::TYPE_EXTENSION_PANEL) {
938 if (item.status != ash::STATUS_IS_PENDING) 938 if (item.status != ash::STATUS_IS_PENDING)
939 app_icon_loader_->FetchImage(app_id); 939 app_icon_loader_->FetchImage(app_id);
940 } 940 }
941 return id; 941 return id;
942 } 942 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698