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

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

Issue 2754413002: Disable ERROR logging for the valid case in app list sync service. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 1018
1019 void AppListSyncableService::ProcessExistingSyncItem(SyncItem* sync_item) { 1019 void AppListSyncableService::ProcessExistingSyncItem(SyncItem* sync_item) {
1020 if (sync_item->item_type == 1020 if (sync_item->item_type ==
1021 sync_pb::AppListSpecifics::TYPE_REMOVE_DEFAULT_APP) { 1021 sync_pb::AppListSpecifics::TYPE_REMOVE_DEFAULT_APP) {
1022 return; 1022 return;
1023 } 1023 }
1024 VLOG(2) << "ProcessExistingSyncItem: " << sync_item->ToString(); 1024 VLOG(2) << "ProcessExistingSyncItem: " << sync_item->ToString();
1025 AppListItem* app_item = model_->FindItem(sync_item->item_id); 1025 AppListItem* app_item = model_->FindItem(sync_item->item_id);
1026 DVLOG(2) << " AppItem: " << app_item->ToDebugString(); 1026 DVLOG(2) << " AppItem: " << app_item->ToDebugString();
1027 if (!app_item) { 1027 if (!app_item) {
1028 LOG(ERROR) << "Item not found in model: " << sync_item->ToString(); 1028 // This is expected in case the user uses devices with different app set,
1029 // for example, ARC enabled and ARC disabled devices. Another scenario is
1030 // app pinned by default (YouTube, for instance) but which has not been yet
1031 // installed on this device.
1032 DVLOG(2) << "Skip updating missing item : " << sync_item->ToString();
1029 return; 1033 return;
1030 } 1034 }
1031 // This is the only place where sync can cause an item to change folders. 1035 // This is the only place where sync can cause an item to change folders.
1032 if (app_list::switches::IsFolderUIEnabled() && 1036 if (app_list::switches::IsFolderUIEnabled() &&
1033 app_item->folder_id() != sync_item->parent_id && 1037 app_item->folder_id() != sync_item->parent_id &&
1034 !AppIsOem(app_item->id())) { 1038 !AppIsOem(app_item->id())) {
1035 VLOG(2) << " Moving Item To Folder: " << sync_item->parent_id; 1039 VLOG(2) << " Moving Item To Folder: " << sync_item->parent_id;
1036 model_->MoveItemToFolder(app_item, sync_item->parent_id); 1040 model_->MoveItemToFolder(app_item, sync_item->parent_id);
1037 } 1041 }
1038 UpdateAppItemFromSyncItem(sync_item, app_item); 1042 UpdateAppItemFromSyncItem(sync_item, app_item);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 res += " { " + item_name + " }"; 1250 res += " { " + item_name + " }";
1247 res += " [" + item_ordinal.ToDebugString() + "]"; 1251 res += " [" + item_ordinal.ToDebugString() + "]";
1248 if (!parent_id.empty()) 1252 if (!parent_id.empty())
1249 res += " <" + parent_id.substr(0, 8) + ">"; 1253 res += " <" + parent_id.substr(0, 8) + ">";
1250 res += " [" + item_pin_ordinal.ToDebugString() + "]"; 1254 res += " [" + item_pin_ordinal.ToDebugString() + "]";
1251 } 1255 }
1252 return res; 1256 return res;
1253 } 1257 }
1254 1258
1255 } // namespace app_list 1259 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698