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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 2918223002: mash: Make ShelfWindowWatcher items for unknown windows. (Closed)
Patch Set: Disable failing mash browser test for now. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_window_watcher_unittest.cc ('k') | testing/buildbot/filters/mash.browser_tests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 657d1bf9a9b04cafec53f21c321b6365e5083cb1..ff220ece41649ca9394033f704f056478bdd263b 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -1283,8 +1283,8 @@ void ChromeLauncherController::OnAutoHideBehaviorChanged(
void ChromeLauncherController::OnShelfItemAdded(int32_t index,
const ash::ShelfItem& item) {
- DCHECK(ash_util::IsRunningInMash()) << "Unexpected model synchronization";
- DCHECK(!applying_remote_shelf_model_changes_) << "Unexpected model change";
+ DCHECK(ash_util::IsRunningInMash()) << " Unexpected model synchronization";
+ DCHECK(!applying_remote_shelf_model_changes_) << " Unexpected model change";
// Ignore notifications of adding the AppList item; it should already exist.
if (item.id.app_id == ash::kAppListId) {
@@ -1292,19 +1292,19 @@ void ChromeLauncherController::OnShelfItemAdded(int32_t index,
return;
}
- DCHECK_LE(index, model_->item_count()) << "Index out of bounds";
- DCHECK_GT(index, 0) << "Items can not preceed the AppList";
+ DCHECK_LE(index, model_->item_count()) << " Index out of bounds";
+ DCHECK_GT(index, 0) << " Items can not preceed the AppList";
index = std::min(std::max(index, 1), model_->item_count());
base::AutoReset<bool> reset(&applying_remote_shelf_model_changes_, true);
model_->AddAt(index, item);
}
void ChromeLauncherController::OnShelfItemRemoved(const ash::ShelfID& id) {
- DCHECK(ash_util::IsRunningInMash()) << "Unexpected model synchronization";
- DCHECK(!applying_remote_shelf_model_changes_) << "Unexpected model change";
+ DCHECK(ash_util::IsRunningInMash()) << " Unexpected model synchronization";
+ DCHECK(!applying_remote_shelf_model_changes_) << " Unexpected model change";
const int index = model_->ItemIndexByID(id);
- DCHECK_GE(index, 0) << "Item not found";
- DCHECK_NE(index, 0) << "The AppList shelf item cannot be removed";
+ DCHECK_GE(index, 0) << " No item found with the id: " << id;
+ DCHECK_NE(index, 0) << " The AppList shelf item cannot be removed";
if (index <= 0)
return;
base::AutoReset<bool> reset(&applying_remote_shelf_model_changes_, true);
@@ -1313,17 +1313,17 @@ void ChromeLauncherController::OnShelfItemRemoved(const ash::ShelfID& id) {
void ChromeLauncherController::OnShelfItemMoved(const ash::ShelfID& id,
int32_t index) {
- DCHECK(ash_util::IsRunningInMash()) << "Unexpected model synchronization";
- DCHECK(!applying_remote_shelf_model_changes_) << "Unexpected model change";
+ DCHECK(ash_util::IsRunningInMash()) << " Unexpected model synchronization";
+ DCHECK(!applying_remote_shelf_model_changes_) << " Unexpected model change";
const int current_index = model_->ItemIndexByID(id);
- DCHECK_GE(current_index, 0) << "No item found with the given id";
- DCHECK_NE(current_index, 0) << "The AppList shelf item cannot be moved";
+ DCHECK_GE(current_index, 0) << " No item found with the id: " << id;
+ DCHECK_NE(current_index, 0) << " The AppList shelf item cannot be moved";
if (current_index <= 0)
return;
- DCHECK_GT(index, 0) << "Items can not preceed the AppList";
- DCHECK_LT(index, model_->item_count()) << "Index out of bounds";
+ DCHECK_GT(index, 0) << " Items can not preceed the AppList";
+ DCHECK_LT(index, model_->item_count()) << " Index out of bounds";
index = std::min(std::max(index, 1), model_->item_count() - 1);
- DCHECK_NE(current_index, index) << "The item is already at the given index";
+ DCHECK_NE(current_index, index) << " The item is already at the given index";
if (current_index == index)
return;
base::AutoReset<bool> reset(&applying_remote_shelf_model_changes_, true);
@@ -1331,10 +1331,10 @@ void ChromeLauncherController::OnShelfItemMoved(const ash::ShelfID& id,
}
void ChromeLauncherController::OnShelfItemUpdated(const ash::ShelfItem& item) {
- DCHECK(ash_util::IsRunningInMash()) << "Unexpected model synchronization";
- DCHECK(!applying_remote_shelf_model_changes_) << "Unexpected model change";
+ DCHECK(ash_util::IsRunningInMash()) << " Unexpected model synchronization";
+ DCHECK(!applying_remote_shelf_model_changes_) << " Unexpected model change";
const int index = model_->ItemIndexByID(item.id);
- DCHECK_GE(index, 0) << "No item found with the given id";
+ DCHECK_GE(index, 0) << " No item found with the id: " << item.id;
if (index < 0)
return;
base::AutoReset<bool> reset(&applying_remote_shelf_model_changes_, true);
@@ -1344,8 +1344,8 @@ void ChromeLauncherController::OnShelfItemUpdated(const ash::ShelfItem& item) {
void ChromeLauncherController::OnShelfItemDelegateChanged(
const ash::ShelfID& id,
ash::mojom::ShelfItemDelegatePtr delegate) {
- DCHECK(ash_util::IsRunningInMash()) << "Unexpected model synchronization";
- DCHECK(!applying_remote_shelf_model_changes_) << "Unexpected model change";
+ DCHECK(ash_util::IsRunningInMash()) << " Unexpected model synchronization";
+ DCHECK(!applying_remote_shelf_model_changes_) << " Unexpected model change";
base::AutoReset<bool> reset(&applying_remote_shelf_model_changes_, true);
if (delegate.is_bound()) {
model_->SetShelfItemDelegate(id,
« no previous file with comments | « ash/shelf/shelf_window_watcher_unittest.cc ('k') | testing/buildbot/filters/mash.browser_tests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698