| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 // The extensions for this profile have not yet all been loaded. | 240 // The extensions for this profile have not yet all been loaded. |
| 241 registrar_.Add(this, | 241 registrar_.Add(this, |
| 242 extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED, | 242 extensions::NOTIFICATION_EXTENSIONS_READY_DEPRECATED, |
| 243 content::Source<Profile>(profile)); | 243 content::Source<Profile>(profile)); |
| 244 } | 244 } |
| 245 | 245 |
| 246 AppListSyncableService::~AppListSyncableService() { | 246 AppListSyncableService::~AppListSyncableService() { |
| 247 // Remove observers. | 247 // Remove observers. |
| 248 model_observer_.reset(); | 248 model_observer_.reset(); |
| 249 model_pref_updater_.reset(); |
| 249 | 250 |
| 250 STLDeleteContainerPairSecondPointers(sync_items_.begin(), sync_items_.end()); | 251 STLDeleteContainerPairSecondPointers(sync_items_.begin(), sync_items_.end()); |
| 251 } | 252 } |
| 252 | 253 |
| 253 void AppListSyncableService::BuildModel() { | 254 void AppListSyncableService::BuildModel() { |
| 254 // For now, use the AppListControllerDelegate associated with the native | 255 // For now, use the AppListControllerDelegate associated with the native |
| 255 // desktop. TODO(stevenjb): Remove ExtensionAppModelBuilder controller | 256 // desktop. TODO(stevenjb): Remove ExtensionAppModelBuilder controller |
| 256 // dependency and move the dependent methods from AppListControllerDelegate | 257 // dependency and move the dependent methods from AppListControllerDelegate |
| 257 // to an extension service delegate associated with this class. | 258 // to an extension service delegate associated with this class. |
| 258 AppListControllerDelegate* controller = NULL; | 259 AppListControllerDelegate* controller = NULL; |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 } else { | 936 } else { |
| 936 res += " { " + item_name + " }"; | 937 res += " { " + item_name + " }"; |
| 937 res += " [" + item_ordinal.ToDebugString() + "]"; | 938 res += " [" + item_ordinal.ToDebugString() + "]"; |
| 938 if (!parent_id.empty()) | 939 if (!parent_id.empty()) |
| 939 res += " <" + parent_id.substr(0, 8) + ">"; | 940 res += " <" + parent_id.substr(0, 8) + ">"; |
| 940 } | 941 } |
| 941 return res; | 942 return res; |
| 942 } | 943 } |
| 943 | 944 |
| 944 } // namespace app_list | 945 } // namespace app_list |
| OLD | NEW |