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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/apps/drive/drive_app_provider.h" | 8 #include "chrome/browser/apps/drive/drive_app_provider.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 const sync_pb::AppListSpecifics& specifics = data.GetSpecifics().app_list(); | 548 const sync_pb::AppListSpecifics& specifics = data.GetSpecifics().app_list(); |
549 DVLOG(2) << this << " Initial Sync Item: " << item_id | 549 DVLOG(2) << this << " Initial Sync Item: " << item_id |
550 << " Type: " << specifics.item_type(); | 550 << " Type: " << specifics.item_type(); |
551 DCHECK_EQ(syncer::APP_LIST, data.GetDataType()); | 551 DCHECK_EQ(syncer::APP_LIST, data.GetDataType()); |
552 if (ProcessSyncItemSpecifics(specifics)) | 552 if (ProcessSyncItemSpecifics(specifics)) |
553 ++new_items; | 553 ++new_items; |
554 else | 554 else |
555 ++updated_items; | 555 ++updated_items; |
556 if (specifics.item_type() != sync_pb::AppListSpecifics::TYPE_FOLDER && | 556 if (specifics.item_type() != sync_pb::AppListSpecifics::TYPE_FOLDER && |
557 !IsUnRemovableDefaultApp(item_id) && | 557 !IsUnRemovableDefaultApp(item_id) && |
| 558 !AppIsOem(item_id) && |
558 !AppIsDefault(extension_system_->extension_service(), item_id)) { | 559 !AppIsDefault(extension_system_->extension_service(), item_id)) { |
559 VLOG(2) << "Syncing non-default item: " << item_id; | 560 VLOG(2) << "Syncing non-default item: " << item_id; |
560 first_app_list_sync_ = false; | 561 first_app_list_sync_ = false; |
561 } | 562 } |
562 unsynced_items.erase(item_id); | 563 unsynced_items.erase(item_id); |
563 } | 564 } |
564 | 565 |
565 result.set_num_items_after_association(sync_items_.size()); | 566 result.set_num_items_after_association(sync_items_.size()); |
566 result.set_num_items_added(new_items); | 567 result.set_num_items_added(new_items); |
567 result.set_num_items_deleted(0); | 568 result.set_num_items_deleted(0); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 } else { | 917 } else { |
917 res += " { " + item_name + " }"; | 918 res += " { " + item_name + " }"; |
918 res += " [" + item_ordinal.ToDebugString() + "]"; | 919 res += " [" + item_ordinal.ToDebugString() + "]"; |
919 if (!parent_id.empty()) | 920 if (!parent_id.empty()) |
920 res += " <" + parent_id.substr(0, 8) + ">"; | 921 res += " <" + parent_id.substr(0, 8) + ">"; |
921 } | 922 } |
922 return res; | 923 return res; |
923 } | 924 } |
924 | 925 |
925 } // namespace app_list | 926 } // namespace app_list |
OLD | NEW |