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

Unified Diff: chrome/browser/extensions/app_sync_bundle.cc

Issue 996213005: Don't crash when trying to create an ExtensionSyncData from invalid SyncData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: kalmanize Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/apps/ephemeral_app_browsertest.cc ('k') | chrome/browser/extensions/app_sync_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_sync_bundle.cc
diff --git a/chrome/browser/extensions/app_sync_bundle.cc b/chrome/browser/extensions/app_sync_bundle.cc
index 69a5db6c656b120274af25b1170fd2f5c73afb53..c50f2c9aa7361b503735c8954024a6ae07080af5 100644
--- a/chrome/browser/extensions/app_sync_bundle.cc
+++ b/chrome/browser/extensions/app_sync_bundle.cc
@@ -33,9 +33,11 @@ void AppSyncBundle::SetupSync(
for (syncer::SyncDataList::const_iterator i = initial_sync_data.begin();
i != initial_sync_data.end();
++i) {
- AppSyncData app_sync_data(*i);
- AddApp(app_sync_data.id());
- extension_sync_service_->ProcessAppSyncData(app_sync_data);
+ scoped_ptr<AppSyncData> app_sync_data(AppSyncData::CreateFromSyncData(*i));
+ if (app_sync_data.get()) {
+ AddApp(app_sync_data->id());
+ extension_sync_service_->ProcessAppSyncData(*app_sync_data);
+ }
}
}
« no previous file with comments | « chrome/browser/apps/ephemeral_app_browsertest.cc ('k') | chrome/browser/extensions/app_sync_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698