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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentEncodingData.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 #define DocumentEncodingData_h 32 #define DocumentEncodingData_h
33 33
34 #include "platform/CrossThreadCopier.h" 34 #include "platform/CrossThreadCopier.h"
35 #include "wtf/Allocator.h" 35 #include "wtf/Allocator.h"
36 #include "wtf/text/TextEncoding.h" 36 #include "wtf/text/TextEncoding.h"
37 37
38 namespace blink { 38 namespace blink {
39 class TextResourceDecoder; 39 class TextResourceDecoder;
40 40
41 class DocumentEncodingData { 41 class DocumentEncodingData {
42 DISALLOW_ALLOCATION(); 42 DISALLOW_NEW();
43 public: 43 public:
44 DocumentEncodingData(); 44 DocumentEncodingData();
45 explicit DocumentEncodingData(const TextResourceDecoder&); 45 explicit DocumentEncodingData(const TextResourceDecoder&);
46 46
47 const WTF::TextEncoding& encoding() const { return m_encoding; } 47 const WTF::TextEncoding& encoding() const { return m_encoding; }
48 void setEncoding(const WTF::TextEncoding&); 48 void setEncoding(const WTF::TextEncoding&);
49 bool wasDetectedHeuristically() const { return m_wasDetectedHeuristically; } 49 bool wasDetectedHeuristically() const { return m_wasDetectedHeuristically; }
50 bool sawDecodingError() const { return m_sawDecodingError; } 50 bool sawDecodingError() const { return m_sawDecodingError; }
51 51
52 private: 52 private:
53 WTF::TextEncoding m_encoding; 53 WTF::TextEncoding m_encoding;
54 bool m_wasDetectedHeuristically; 54 bool m_wasDetectedHeuristically;
55 bool m_sawDecodingError; 55 bool m_sawDecodingError;
56 }; 56 };
57 57
58 template<> struct CrossThreadCopierBase<false, false, false, DocumentEncodingDat a> : public CrossThreadCopierPassThrough<DocumentEncodingData> { 58 template<> struct CrossThreadCopierBase<false, false, false, DocumentEncodingDat a> : public CrossThreadCopierPassThrough<DocumentEncodingData> {
59 }; 59 };
60 60
61 inline bool operator!=(const DocumentEncodingData& a, const DocumentEncodingData & b) 61 inline bool operator!=(const DocumentEncodingData& a, const DocumentEncodingData & b)
62 { 62 {
63 return a.encoding() != b.encoding() 63 return a.encoding() != b.encoding()
64 || a.wasDetectedHeuristically() != b.wasDetectedHeuristically() 64 || a.wasDetectedHeuristically() != b.wasDetectedHeuristically()
65 || a.sawDecodingError() != b.sawDecodingError(); 65 || a.sawDecodingError() != b.sawDecodingError();
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
69 69
70 #endif // DocumentEncodingData_h 70 #endif // DocumentEncodingData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DOMArrayPiece.h ('k') | third_party/WebKit/Source/core/dom/DocumentLifecycle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698