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

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

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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/ui/app_list/extension_app_item.h" 5 #include "chrome/browser/ui/app_list/extension_app_item.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/extensions/extension_util.h" 11 #include "chrome/browser/extensions/extension_util.h"
12 #include "chrome/browser/extensions/launch_util.h" 12 #include "chrome/browser/extensions/launch_util.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" 14 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
15 #include "chrome/browser/ui/app_list/extension_app_context_menu.h" 15 #include "chrome/browser/ui/app_list/extension_app_context_menu.h"
16 #include "chrome/browser/ui/extensions/extension_enable_flow.h" 16 #include "chrome/browser/ui/extensions/extension_enable_flow.h"
17 #include "chrome/common/extensions/extension_constants.h" 17 #include "chrome/common/extensions/extension_constants.h"
18 #include "chrome/common/extensions/extension_metrics.h" 18 #include "chrome/common/extensions/extension_metrics.h"
19 #include "components/prefs/pref_service.h" 19 #include "components/prefs/pref_service.h"
20 #include "components/sync/api/string_ordinal.h"
20 #include "content/public/browser/user_metrics.h" 21 #include "content/public/browser/user_metrics.h"
21 #include "extensions/browser/app_sorting.h" 22 #include "extensions/browser/app_sorting.h"
22 #include "extensions/browser/extension_prefs.h" 23 #include "extensions/browser/extension_prefs.h"
23 #include "extensions/browser/extension_registry.h" 24 #include "extensions/browser/extension_registry.h"
24 #include "extensions/common/extension.h" 25 #include "extensions/common/extension.h"
25 #include "extensions/common/extension_icon_set.h" 26 #include "extensions/common/extension_icon_set.h"
26 #include "extensions/common/manifest_handlers/icons_handler.h" 27 #include "extensions/common/manifest_handlers/icons_handler.h"
27 #include "extensions/common/manifest_url_handlers.h" 28 #include "extensions/common/manifest_url_handlers.h"
28 #include "grit/theme_resources.h" 29 #include "grit/theme_resources.h"
29 #include "sync/api/string_ordinal.h"
30 #include "ui/base/resource/resource_bundle.h" 30 #include "ui/base/resource/resource_bundle.h"
31 #include "ui/events/event_constants.h" 31 #include "ui/events/event_constants.h"
32 #include "ui/gfx/canvas.h" 32 #include "ui/gfx/canvas.h"
33 #include "ui/gfx/geometry/rect.h" 33 #include "ui/gfx/geometry/rect.h"
34 #include "ui/gfx/image/canvas_image_source.h" 34 #include "ui/gfx/image/canvas_image_source.h"
35 35
36 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
37 #include "chrome/browser/chromeos/extensions/gfx_utils.h" 37 #include "chrome/browser/chromeos/extensions/gfx_utils.h"
38 #endif 38 #endif
39 39
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 349 }
350 350
351 void ExtensionAppItem::UpdatePositionFromOrdering() { 351 void ExtensionAppItem::UpdatePositionFromOrdering() {
352 const syncer::StringOrdinal& page = 352 const syncer::StringOrdinal& page =
353 GetAppSorting()->GetPageOrdinal(extension_id()); 353 GetAppSorting()->GetPageOrdinal(extension_id());
354 const syncer::StringOrdinal& launch = 354 const syncer::StringOrdinal& launch =
355 GetAppSorting()->GetAppLaunchOrdinal(extension_id()); 355 GetAppSorting()->GetAppLaunchOrdinal(extension_id());
356 set_position(syncer::StringOrdinal( 356 set_position(syncer::StringOrdinal(
357 page.ToInternalValue() + launch.ToInternalValue())); 357 page.ToInternalValue() + launch.ToInternalValue()));
358 } 358 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698