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

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

Issue 10704023: Moved ExtensionPrefs and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest-er master merged in Created 8 years, 5 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"
11 #include "content/public/browser/notification_service.h" 11 #include "content/public/browser/notification_service.h"
12 12
13 using extensions::ExtensionPrefs;
14
13 namespace { 15 namespace {
14 16
15 // The number of apps per page. This isn't a hard limit, but new apps installed 17 // The number of apps per page. This isn't a hard limit, but new apps installed
16 // from the webstore will overflow onto a new page if this limit is reached. 18 // from the webstore will overflow onto a new page if this limit is reached.
17 const size_t kNaturalAppPageSize = 18; 19 const size_t kNaturalAppPageSize = 18;
18 20
19 // A preference determining the order of which the apps appear on the NTP. 21 // A preference determining the order of which the apps appear on the NTP.
20 const char kPrefAppLaunchIndexDeprecated[] = "app_launcher_index"; 22 const char kPrefAppLaunchIndexDeprecated[] = "app_launcher_index";
21 const char kPrefAppLaunchOrdinal[] = "app_launcher_ordinal"; 23 const char kPrefAppLaunchOrdinal[] = "app_launcher_ordinal";
22 24
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 if (ext) { 505 if (ext) {
504 // It is possible for old extension to have ordinal values, but they 506 // It is possible for old extension to have ordinal values, but they
505 // shouldn't so we clear them. 507 // shouldn't so we clear them.
506 if (!ext->is_app()) 508 if (!ext->is_app())
507 ClearOrdinals(extension_id); 509 ClearOrdinals(extension_id);
508 510
509 extension_service_->SyncExtensionChangeIfNeeded(*ext); 511 extension_service_->SyncExtensionChangeIfNeeded(*ext);
510 } 512 }
511 } 513 }
512 } 514 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_sorting.h ('k') | chrome/browser/extensions/extension_sorting_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698