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

Side by Side Diff: chrome/browser/extensions/extension_sorting.cc

Issue 9968066: Merge 130040 - Fix Crash in ExtensionSorting::SyncIfNeeded (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1084/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/extension_sorting.h" 5 #include "chrome/browser/extensions/extension_sorting.h"
6 6
7 #include "chrome/browser/extensions/extension_scoped_prefs.h" 7 #include "chrome/browser/extensions/extension_scoped_prefs.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/common/chrome_notification_types.h" 9 #include "chrome/common/chrome_notification_types.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 } 499 }
500 } 500 }
501 501
502 void ExtensionSorting::SyncIfNeeded(const std::string& extension_id) { 502 void ExtensionSorting::SyncIfNeeded(const std::string& extension_id) {
503 if (extension_service_) { 503 if (extension_service_) {
504 const Extension* ext = 504 const Extension* ext =
505 extension_service_->GetInstalledExtension(extension_id); 505 extension_service_->GetInstalledExtension(extension_id);
506 506
507 if (ext) { 507 if (ext) {
508 CHECK(ext->is_app()); 508 // It is possible for old extension to have ordinal values, but they
509 // shouldn't so we clear them.
510 if (!ext->is_app())
511 ClearOrdinals(extension_id);
512
509 extension_service_->SyncExtensionChangeIfNeeded(*ext); 513 extension_service_->SyncExtensionChangeIfNeeded(*ext);
510 } 514 }
511 } 515 }
512 } 516 }
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