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

Side by Side Diff: base/enum_validation.h

Issue 15841011: Implement off-the-wire validation scheme for enum types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct check in content_settings.h Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BASE_ENUM_VALIDATION_H
6 #define BASE_ENUM_VALIDATION_H
7
8 // Defines a function template which enum authors can specialize to perform
9 // validation upon an untrusted value prior to its being cast to their enum
10 // type. Intended mainly for use by (generated) unmarshalling code.
11 template <typename T> inline bool IsIntValidForEnum(int x) { return true; }
12
13 #endif // BASE_ENUM_VALIDATION_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698