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

Side by Side Diff: Source/platform/PurgeableVector.h

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/platform/PrerenderClient.h ('k') | Source/platform/PurgeableVector.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 24 matching lines...) Expand all
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 #include "wtf/Noncopyable.h" 36 #include "wtf/Noncopyable.h"
37 #include "wtf/Vector.h" 37 #include "wtf/Vector.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class WebDiscardableMemory; 41 class WebDiscardableMemory;
42 42
43 } // namespace blink 43 } // namespace blink
44 44
45 namespace WebCore { 45 namespace blink {
46 46
47 // A simple vector implementation that supports purgeable memory. The vector is 47 // A simple vector implementation that supports purgeable memory. The vector is
48 // already locked at construction and locking uses an internal counter which 48 // already locked at construction and locking uses an internal counter which
49 // means that N calls to lock() must be followed by N+1 calls to unlock() to 49 // means that N calls to lock() must be followed by N+1 calls to unlock() to
50 // actually make the vector purgeable. 50 // actually make the vector purgeable.
51 class PLATFORM_EXPORT PurgeableVector { 51 class PLATFORM_EXPORT PurgeableVector {
52 WTF_MAKE_NONCOPYABLE(PurgeableVector); 52 WTF_MAKE_NONCOPYABLE(PurgeableVector);
53 public: 53 public:
54 enum PurgeableOption { 54 enum PurgeableOption {
55 NotPurgeable, 55 NotPurgeable,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // Note that there can't be data both in |m_vector| and 115 // Note that there can't be data both in |m_vector| and
116 // |m_discardable|, i.e. only one of them is used at a given time. 116 // |m_discardable|, i.e. only one of them is used at a given time.
117 Vector<char> m_vector; 117 Vector<char> m_vector;
118 OwnPtr<blink::WebDiscardableMemory> m_discardable; 118 OwnPtr<blink::WebDiscardableMemory> m_discardable;
119 size_t m_discardableCapacity; 119 size_t m_discardableCapacity;
120 size_t m_discardableSize; 120 size_t m_discardableSize;
121 bool m_isPurgeable; 121 bool m_isPurgeable;
122 int m_locksCount; 122 int m_locksCount;
123 }; 123 };
124 124
125 } // namespace WebCore 125 } // namespace blink
126 126
127 #endif // PurgeableVector_h 127 #endif // PurgeableVector_h
OLDNEW
« no previous file with comments | « Source/platform/PrerenderClient.h ('k') | Source/platform/PurgeableVector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698