OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 return private_->length(); | 53 return private_->length(); |
54 } | 54 } |
55 | 55 |
56 const char* WebThreadSafeData::Data() const { | 56 const char* WebThreadSafeData::Data() const { |
57 if (private_.IsNull()) | 57 if (private_.IsNull()) |
58 return 0; | 58 return 0; |
59 return private_->data(); | 59 return private_->data(); |
60 } | 60 } |
61 | 61 |
62 WebThreadSafeData::WebThreadSafeData(PassRefPtr<RawData> data) | 62 WebThreadSafeData::WebThreadSafeData(PassRefPtr<RawData> data) |
63 : private_(data) {} | 63 : private_(std::move(data)) {} |
64 | 64 |
65 WebThreadSafeData::WebThreadSafeData(const WebThreadSafeData& other) { | 65 WebThreadSafeData::WebThreadSafeData(const WebThreadSafeData& other) { |
66 private_ = other.private_; | 66 private_ = other.private_; |
67 } | 67 } |
68 | 68 |
69 WebThreadSafeData& WebThreadSafeData::operator=( | 69 WebThreadSafeData& WebThreadSafeData::operator=( |
70 const WebThreadSafeData& other) { | 70 const WebThreadSafeData& other) { |
71 private_ = other.private_; | 71 private_ = other.private_; |
72 return *this; | 72 return *this; |
73 } | 73 } |
74 | 74 |
75 WebThreadSafeData& WebThreadSafeData::operator=(PassRefPtr<RawData> data) { | 75 WebThreadSafeData& WebThreadSafeData::operator=(PassRefPtr<RawData> data) { |
76 private_ = data; | 76 private_ = std::move(data); |
77 return *this; | 77 return *this; |
78 } | 78 } |
79 | 79 |
80 } // namespace blink | 80 } // namespace blink |
OLD | NEW |