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

Side by Side Diff: ash/public/cpp/shelf_types.cc

Issue 2702423004: Validate incoming window properties. (Closed)
Patch Set: rebase to tot Created 3 years, 9 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ash/public/cpp/shelf_types.h"
6
7 #include "base/bind.h"
8 #include "base/callback.h"
9
10 namespace ash {
11
12 namespace {
13
14 bool DoValidateShelfItemType(int32_t i) {
15 return i == TYPE_APP_PANEL || i == TYPE_APP_SHORTCUT || i == TYPE_APP_LIST ||
16 i == TYPE_BROWSER_SHORTCUT || i == TYPE_APP || i == TYPE_DIALOG ||
17 i == TYPE_UNDEFINED;
18 }
19
20 } // namespace
21
22 base::RepeatingCallback<bool(int32_t)> ValidateShelfItemType() {
23 return base::Bind(&DoValidateShelfItemType);
24 }
25
26 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698