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

Side by Side Diff: ash/shelf/app_list_shelf_item_delegate.cc

Issue 2869473002: Fix crash on openning settings when DCHECK is on. (Closed)
Patch Set: address comments Created 3 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
« no previous file with comments | « no previous file | ash/shelf/shelf_model_unittest.cc » ('j') | ash/shelf/shelf_model_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/shelf/app_list_shelf_item_delegate.h" 5 #include "ash/shelf/app_list_shelf_item_delegate.h"
6 6
7 #include "ash/shelf/shelf_model.h" 7 #include "ash/shelf/shelf_model.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/strings/grit/ash_strings.h" 9 #include "ash/strings/grit/ash_strings.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "ui/app_list/app_list_switches.h" 11 #include "ui/app_list/app_list_switches.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 namespace { 16 namespace {
17 17
18 // An app id for the app list, used to identify the shelf item. 18 // An app id for the app list, used to identify the shelf item.
19 static constexpr char kAppListId[] = "AppListId"; 19 // Generated as crx_file::id_util::GenerateId("org.chromium.applist")
20 static constexpr char kAppListId[] = "jlfapfmkapbjlfbpjedlinehodkccjee";
20 21
21 } // namespace 22 } // namespace
22 23
23 // static 24 // static
24 void AppListShelfItemDelegate::CreateAppListItemAndDelegate(ShelfModel* model) { 25 void AppListShelfItemDelegate::CreateAppListItemAndDelegate(ShelfModel* model) {
25 // Add the app list item to the shelf model. 26 // Add the app list item to the shelf model.
26 ShelfItem item; 27 ShelfItem item;
27 item.type = TYPE_APP_LIST; 28 item.type = TYPE_APP_LIST;
28 item.id = ShelfID(kAppListId); 29 item.id = ShelfID(kAppListId);
29 item.title = l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE); 30 item.title = l10n_util::GetStringUTF16(IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE);
(...skipping 21 matching lines...) Expand all
51 52
52 void AppListShelfItemDelegate::ExecuteCommand(uint32_t command_id, 53 void AppListShelfItemDelegate::ExecuteCommand(uint32_t command_id,
53 int32_t event_flags) { 54 int32_t event_flags) {
54 // This delegate does not support showing an application menu. 55 // This delegate does not support showing an application menu.
55 NOTIMPLEMENTED(); 56 NOTIMPLEMENTED();
56 } 57 }
57 58
58 void AppListShelfItemDelegate::Close() {} 59 void AppListShelfItemDelegate::Close() {}
59 60
60 } // namespace ash 61 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_model_unittest.cc » ('j') | ash/shelf/shelf_model_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698