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

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

Issue 2067943004: ARC: Add badge for Chrome hosted Apps if Arc++ is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address xiyuan@'s comment. Rebase Created 4 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ash/launcher/launcher_arc_app_updater.h" 5 #include "chrome/browser/ui/ash/launcher/launcher_arc_app_updater.h"
6 6
7 LauncherArcAppUpdater::LauncherArcAppUpdater( 7 LauncherArcAppUpdater::LauncherArcAppUpdater(
8 Delegate* delegate, 8 Delegate* delegate,
9 content::BrowserContext* browser_context) 9 content::BrowserContext* browser_context)
10 : LauncherAppUpdater(delegate, browser_context) { 10 : LauncherAppUpdater(delegate, browser_context) {
11 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(browser_context); 11 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(browser_context);
12 DCHECK(prefs); 12 DCHECK(prefs);
13 prefs->AddObserver(this); 13 prefs->AddObserver(this);
14 } 14 }
15 15
16 LauncherArcAppUpdater::~LauncherArcAppUpdater() { 16 LauncherArcAppUpdater::~LauncherArcAppUpdater() {
17 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(browser_context()); 17 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(browser_context());
18 DCHECK(prefs); 18 DCHECK(prefs);
19 prefs->RemoveObserver(this); 19 prefs->RemoveObserver(this);
20 } 20 }
21 21
22 void LauncherArcAppUpdater::OnAppRegistered( 22 void LauncherArcAppUpdater::OnAppRegistered(
23 const std::string& app_id, 23 const std::string& app_id,
24 const ArcAppListPrefs::AppInfo& app_info) { 24 const ArcAppListPrefs::AppInfo& app_info) {
25 delegate()->OnAppInstalled(browser_context(), app_id); 25 delegate()->OnAppInstalled(browser_context(), app_id);
26 } 26 }
27 27
28 void LauncherArcAppUpdater::OnAppRemoved(const std::string& app_id) { 28 void LauncherArcAppUpdater::OnAppRemoved(const std::string& app_id) {
29 delegate()->OnAppUninstalledPrepared(browser_context(), app_id);
29 delegate()->OnAppUninstalled(browser_context(), app_id); 30 delegate()->OnAppUninstalled(browser_context(), app_id);
30 } 31 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_app_updater.h ('k') | chrome/browser/ui/ash/launcher/launcher_extension_app_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698