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

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

Issue 661913002: Fix ModelPrefUpdater destruction order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@app_list_pref
Patch Set: Created 6 years, 2 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 "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
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
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
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