Chromium Code Reviews| Index: chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc |
| diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc |
| index 3674b2e100da09ab27eea2d505c9a289210ce246..3a889ce84014a65b9597d59afc133d0bdc5369cf 100644 |
| --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc |
| +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc |
| @@ -354,17 +354,10 @@ void ArcAppListPrefs::SetNotificationsEnabled(const std::string& app_id, |
| return; |
| } |
| - arc::mojom::AppInstance* app_instance = app_instance_holder_->instance(); |
| - if (!app_instance) { |
| - // AppInstance should be ready since we have app_id in ready_apps_. |
| - NOTREACHED(); |
| - return; |
| - } |
| - |
| - if (app_instance_holder_->version() < kSetNotificationsEnabledMinVersion) { |
| - VLOG(2) << "app version is too small to set notifications enabled."; |
| + auto* app_instance = app_instance_holder_->GetInstanceForVersion( |
|
Yusuke Sato
2016/09/16 23:58:48
is * necessary here?
(ok, confirmed this with Lui
Luis Héctor Chávez
2016/09/17 00:30:53
Acknowledged.
|
| + kSetNotificationsEnabledMinVersion, "SetNotificationsEnabled"); |
| + if (!app_instance) |
| return; |
| - } |
| SetNotificationsEnabledDeferred(prefs_).Remove(app_id); |
| app_instance->SetNotificationsEnabled(app_info->package_name, enabled); |
| @@ -1145,7 +1138,6 @@ std::vector<std::string> ArcAppListPrefs::GetPackagesFromPrefs( |
| prefs_->GetDictionary(prefs::kArcPackages); |
| for (base::DictionaryValue::Iterator package(*package_prefs); |
| !package.IsAtEnd(); package.Advance()) { |
| - |
| bool uninstalled = false; |
| package_prefs->GetBoolean(kSystem, &uninstalled); |
| if (installed != !uninstalled) |