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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.h

Issue 1406923009: Rename DISALLOW_ALLOCATION and ALLOW_ONLY_INLINE_ALLOCATION (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following condition 5 * modification, are permitted provided that the following condition
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 17 matching lines...) Expand all
28 28
29 #ifndef SQLValue_h 29 #ifndef SQLValue_h
30 #define SQLValue_h 30 #define SQLValue_h
31 31
32 #include "wtf/Allocator.h" 32 #include "wtf/Allocator.h"
33 #include "wtf/text/WTFString.h" 33 #include "wtf/text/WTFString.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class SQLValue { 37 class SQLValue {
38 ALLOW_ONLY_INLINE_ALLOCATION(); 38 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
39 public: 39 public:
40 enum Type { NullValue, NumberValue, StringValue }; 40 enum Type { NullValue, NumberValue, StringValue };
41 41
42 SQLValue() : m_type(NullValue), m_number(0.0) { } 42 SQLValue() : m_type(NullValue), m_number(0.0) { }
43 SQLValue(double number) : m_type(NumberValue), m_number(number) { } 43 SQLValue(double number) : m_type(NumberValue), m_number(number) { }
44 SQLValue(const String& s) : m_type(StringValue), m_number(0.0), m_string(s) { } 44 SQLValue(const String& s) : m_type(StringValue), m_number(0.0), m_string(s) { }
45 SQLValue(const SQLValue&); 45 SQLValue(const SQLValue&);
46 46
47 Type type() const { return m_type; } 47 Type type() const { return m_type; }
48 48
49 String string() const; 49 String string() const;
50 double number() const; 50 double number() const;
51 51
52 private: 52 private:
53 Type m_type; 53 Type m_type;
54 double m_number; 54 double m_number;
55 String m_string; 55 String m_string;
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif 60 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698