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/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "ui/app_list/app_list_model_observer.h" | 26 #include "ui/app_list/app_list_model_observer.h" |
27 #include "ui/app_list/app_list_switches.h" | 27 #include "ui/app_list/app_list_switches.h" |
28 | 28 |
29 using syncer::SyncChange; | 29 using syncer::SyncChange; |
30 | 30 |
31 namespace app_list { | 31 namespace app_list { |
32 | 32 |
33 namespace { | 33 namespace { |
34 | 34 |
35 bool SyncAppListEnabled() { | 35 bool SyncAppListEnabled() { |
36 return CommandLine::ForCurrentProcess()->HasSwitch( | 36 return !CommandLine::ForCurrentProcess()->HasSwitch( |
37 ::switches::kEnableSyncAppList); | 37 ::switches::kDisableSyncAppList); |
38 } | 38 } |
39 | 39 |
40 void UpdateSyncItemFromSync(const sync_pb::AppListSpecifics& specifics, | 40 void UpdateSyncItemFromSync(const sync_pb::AppListSpecifics& specifics, |
41 AppListSyncableService::SyncItem* item) { | 41 AppListSyncableService::SyncItem* item) { |
42 DCHECK_EQ(item->item_id, specifics.item_id()); | 42 DCHECK_EQ(item->item_id, specifics.item_id()); |
43 item->item_type = specifics.item_type(); | 43 item->item_type = specifics.item_type(); |
44 item->item_name = specifics.item_name(); | 44 item->item_name = specifics.item_name(); |
45 item->parent_id = specifics.parent_id(); | 45 item->parent_id = specifics.parent_id(); |
46 if (!specifics.page_ordinal().empty()) | 46 if (!specifics.page_ordinal().empty()) |
47 item->page_ordinal = syncer::StringOrdinal(specifics.page_ordinal()); | 47 item->page_ordinal = syncer::StringOrdinal(specifics.page_ordinal()); |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 } else { | 727 } else { |
728 res += " { " + item_name + " }"; | 728 res += " { " + item_name + " }"; |
729 res += " [" + item_ordinal.ToDebugString() + "]"; | 729 res += " [" + item_ordinal.ToDebugString() + "]"; |
730 if (!parent_id.empty()) | 730 if (!parent_id.empty()) |
731 res += " <" + parent_id.substr(0, 8) + ">"; | 731 res += " <" + parent_id.substr(0, 8) + ">"; |
732 } | 732 } |
733 return res; | 733 return res; |
734 } | 734 } |
735 | 735 |
736 } // namespace app_list | 736 } // namespace app_list |
OLD | NEW |