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

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

Issue 2327203002: [Merge-M54] arc: Disable shelf item creation when secondary user is active. (Closed)
Patch Set: Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 new LauncherArcAppUpdater(this, profile_)); 1573 new LauncherArcAppUpdater(this, profile_));
1574 app_updaters_.push_back(std::move(arc_app_updater)); 1574 app_updaters_.push_back(std::move(arc_app_updater));
1575 } 1575 }
1576 1576
1577 app_list::AppListSyncableService* app_service = 1577 app_list::AppListSyncableService* app_service =
1578 app_list::AppListSyncableServiceFactory::GetForProfile(profile_); 1578 app_list::AppListSyncableServiceFactory::GetForProfile(profile_);
1579 if (app_service) 1579 if (app_service)
1580 app_service->AddObserverAndStart(this); 1580 app_service->AddObserverAndStart(this);
1581 } 1581 }
1582 1582
1583 void ChromeLauncherControllerImpl::SetProfileForTest(Profile* profile) {
1584 profile_ = profile;
1585 }
1586
1583 void ChromeLauncherControllerImpl::ReleaseProfile() { 1587 void ChromeLauncherControllerImpl::ReleaseProfile() {
1584 if (app_sync_ui_state_) 1588 if (app_sync_ui_state_)
1585 app_sync_ui_state_->RemoveObserver(this); 1589 app_sync_ui_state_->RemoveObserver(this);
1586 1590
1587 app_updaters_.clear(); 1591 app_updaters_.clear();
1588 1592
1589 prefs_observer_.reset(); 1593 prefs_observer_.reset();
1590 1594
1591 pref_change_registrar_.RemoveAll(); 1595 pref_change_registrar_.RemoveAll();
1592 1596
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 if (index == -1) 1697 if (index == -1)
1694 continue; 1698 continue;
1695 ash::ShelfItem item = model_->items()[index]; 1699 ash::ShelfItem item = model_->items()[index];
1696 item.image = image; 1700 item.image = image;
1697 if (arc_deferred_launcher_) 1701 if (arc_deferred_launcher_)
1698 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); 1702 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image);
1699 model_->Set(index, item); 1703 model_->Set(index, item);
1700 // It's possible we're waiting on more than one item, so don't break. 1704 // It's possible we're waiting on more than one item, so don't break.
1701 } 1705 }
1702 } 1706 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698