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

Side by Side Diff: net/base/address_tracker_linux_unittest.cc

Issue 835633003: Enable libc++ on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix AOSP Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "net/base/address_tracker_linux.h" 6 #include "net/base/address_tracker_linux.h"
7 7
8 #include <linux/if.h> 8 #include <linux/if.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 attr.nla_type = type; 115 attr.nla_type = type;
116 Append(&attr, sizeof(attr)); 116 Append(&attr, sizeof(attr));
117 Align(); 117 Align();
118 Append(data, length); 118 Append(data, length);
119 Align(); 119 Align();
120 } 120 }
121 121
122 void AppendTo(Buffer* output) const { 122 void AppendTo(Buffer* output) const {
123 CHECK_EQ(NLMSG_ALIGN(output->size()), output->size()); 123 CHECK_EQ(NLMSG_ALIGN(output->size()), output->size());
124 output->reserve(output->size() + NLMSG_LENGTH(buffer_.size())); 124 output->reserve(output->size() + NLMSG_LENGTH(buffer_.size()));
125 output->insert(output->end(), buffer_.begin(), buffer_.end()); 125 // TODO(jdduke): Use proper iterators during insertion after resolution of
126 // GCC + libc++ friending issues on Android.
Nico 2015/01/29 22:51:33 Is this still needed? I thought aosp keeps using s
jdduke (slow) 2015/01/29 22:56:37 Do you know when the fix rolled/landed? I tried re
127 output->insert(output->end(), buffer_.data(),
128 buffer_.data() + buffer_.size());
126 } 129 }
127 130
128 private: 131 private:
129 void Append(const void* data, size_t length) { 132 void Append(const void* data, size_t length) {
130 const char* chardata = reinterpret_cast<const char*>(data); 133 const char* chardata = reinterpret_cast<const char*>(data);
131 buffer_.insert(buffer_.end(), chardata, chardata + length); 134 buffer_.insert(buffer_.end(), chardata, chardata + length);
132 } 135 }
133 136
134 void Align() { 137 void Align() {
135 header()->nlmsg_len = buffer_.size(); 138 header()->nlmsg_len = buffer_.size();
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 550
548 TEST_F(AddressTrackerLinuxTest, NonTrackingModeInit) { 551 TEST_F(AddressTrackerLinuxTest, NonTrackingModeInit) {
549 AddressTrackerLinux tracker; 552 AddressTrackerLinux tracker;
550 tracker.Init(); 553 tracker.Init();
551 } 554 }
552 555
553 } // namespace 556 } // namespace
554 557
555 } // namespace internal 558 } // namespace internal
556 } // namespace net 559 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698