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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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
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/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 it != page_map->second.end(); ++it) { 489 it != page_map->second.end(); ++it) {
490 if (it->second == extension_id) { 490 if (it->second == extension_id) {
491 page_map->second.erase(it); 491 page_map->second.erase(it);
492 break; 492 break;
493 } 493 }
494 } 494 }
495 } 495 }
496 496
497 void ExtensionSorting::SyncIfNeeded(const std::string& extension_id) { 497 void ExtensionSorting::SyncIfNeeded(const std::string& extension_id) {
498 if (extension_service_) { 498 if (extension_service_) {
499 const Extension* ext = 499 const extensions::Extension* ext =
500 extension_service_->GetInstalledExtension(extension_id); 500 extension_service_->GetInstalledExtension(extension_id);
501 501
502 if (ext) { 502 if (ext) {
503 // It is possible for old extension to have ordinal values, but they 503 // It is possible for old extension to have ordinal values, but they
504 // shouldn't so we clear them. 504 // shouldn't so we clear them.
505 if (!ext->is_app()) 505 if (!ext->is_app())
506 ClearOrdinals(extension_id); 506 ClearOrdinals(extension_id);
507 507
508 extension_service_->SyncExtensionChangeIfNeeded(*ext); 508 extension_service_->SyncExtensionChangeIfNeeded(*ext);
509 } 509 }
510 } 510 }
511 } 511 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/extension_sorting_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698