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

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 2295343002: arc: Dont sync app list change caused by Arc opt out. (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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698