Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/app_list/app_list_syncable_service.h" | 5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 } | 212 } |
| 213 | 213 |
| 214 void OnAppListItemWillBeDeleted(AppListItem* item) override { | 214 void OnAppListItemWillBeDeleted(AppListItem* item) override { |
| 215 DCHECK(!adding_item_); | 215 DCHECK(!adding_item_); |
| 216 VLOG(2) << owner_ << " OnAppListItemDeleted: " << item->ToDebugString(); | 216 VLOG(2) << owner_ << " OnAppListItemDeleted: " << item->ToDebugString(); |
| 217 // Don't sync folder removal in case the folder still exists on another | 217 // Don't sync folder removal in case the folder still exists on another |
| 218 // device (e.g. with device specific items in it). Empty folders will be | 218 // device (e.g. with device specific items in it). Empty folders will be |
| 219 // deleted when the last item is removed (in PruneEmptySyncFolders()). | 219 // deleted when the last item is removed (in PruneEmptySyncFolders()). |
| 220 if (item->GetItemType() == AppListFolderItem::kItemType) | 220 if (item->GetItemType() == AppListFolderItem::kItemType) |
| 221 return; | 221 return; |
| 222 | |
| 223 #if defined(OS_CHROMEOS) | |
| 224 if (item->GetItemType() == ArcAppItem::kItemType) { | |
|
khmel
2016/08/31 20:31:48
I tried first not to modify AppListSync but OnAppL
stevenjb
2016/08/31 21:10:49
This seems reasonable. We already have arc related
xiyuan
2016/08/31 21:43:09
nit: fix indent
khmel
2016/09/01 00:03:02
Thanks, will create additional CL to move ArcAuthS
khmel
2016/09/01 00:03:02
Done.
| |
| 225 // Don't sync remove changes coming as result of disabling Arc. | |
| 226 const arc::ArcAuthService* auth_service = arc::ArcAuthService::Get(); | |
| 227 DCHECK(auth_service); | |
| 228 if (!auth_service->IsArcEnabled()) | |
| 229 return; | |
| 230 } | |
| 231 #endif | |
| 232 | |
| 222 owner_->RemoveSyncItem(item->id()); | 233 owner_->RemoveSyncItem(item->id()); |
| 223 } | 234 } |
| 224 | 235 |
| 225 void OnAppListItemUpdated(AppListItem* item) override { | 236 void OnAppListItemUpdated(AppListItem* item) override { |
| 226 if (adding_item_) { | 237 if (adding_item_) { |
| 227 // Adding an item may trigger update notifications which should be | 238 // Adding an item may trigger update notifications which should be |
| 228 // ignored. | 239 // ignored. |
| 229 DCHECK_EQ(adding_item_, item); | 240 DCHECK_EQ(adding_item_, item); |
| 230 return; | 241 return; |
| 231 } | 242 } |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1062 res += " { " + item_name + " }"; | 1073 res += " { " + item_name + " }"; |
| 1063 res += " [" + item_ordinal.ToDebugString() + "]"; | 1074 res += " [" + item_ordinal.ToDebugString() + "]"; |
| 1064 if (!parent_id.empty()) | 1075 if (!parent_id.empty()) |
| 1065 res += " <" + parent_id.substr(0, 8) + ">"; | 1076 res += " <" + parent_id.substr(0, 8) + ">"; |
| 1066 res += " [" + item_pin_ordinal.ToDebugString() + "]"; | 1077 res += " [" + item_pin_ordinal.ToDebugString() + "]"; |
| 1067 } | 1078 } |
| 1068 return res; | 1079 return res; |
| 1069 } | 1080 } |
| 1070 | 1081 |
| 1071 } // namespace app_list | 1082 } // namespace app_list |
| OLD | NEW |