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

Side by Side Diff: extensions/browser/api/socket/socket_api.cc

Issue 216513002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/socket/socket_api.h" 5 #include "extensions/browser/api/socket/socket_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 } 661 }
662 662
663 content::BrowserThread::PostTask( 663 content::BrowserThread::PostTask(
664 content::BrowserThread::UI, 664 content::BrowserThread::UI,
665 FROM_HERE, 665 FROM_HERE,
666 base::Bind(&SocketGetNetworkListFunction::HandleGetNetworkListError, 666 base::Bind(&SocketGetNetworkListFunction::HandleGetNetworkListError,
667 this)); 667 this));
668 } 668 }
669 669
670 void SocketGetNetworkListFunction::HandleGetNetworkListError() { 670 void SocketGetNetworkListFunction::HandleGetNetworkListError() {
671 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 671 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
672 error_ = kNetworkListError; 672 error_ = kNetworkListError;
673 SendResponse(false); 673 SendResponse(false);
674 } 674 }
675 675
676 void SocketGetNetworkListFunction::SendResponseOnUIThread( 676 void SocketGetNetworkListFunction::SendResponseOnUIThread(
677 const net::NetworkInterfaceList& interface_list) { 677 const net::NetworkInterfaceList& interface_list) {
678 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 678 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
679 679
680 std::vector<linked_ptr<core_api::socket::NetworkInterface> > create_arg; 680 std::vector<linked_ptr<core_api::socket::NetworkInterface> > create_arg;
681 create_arg.reserve(interface_list.size()); 681 create_arg.reserve(interface_list.size());
682 for (net::NetworkInterfaceList::const_iterator i = interface_list.begin(); 682 for (net::NetworkInterfaceList::const_iterator i = interface_list.begin();
683 i != interface_list.end(); 683 i != interface_list.end();
684 ++i) { 684 ++i) {
685 linked_ptr<core_api::socket::NetworkInterface> info = 685 linked_ptr<core_api::socket::NetworkInterface> info =
686 make_linked_ptr(new core_api::socket::NetworkInterface); 686 make_linked_ptr(new core_api::socket::NetworkInterface);
687 info->name = i->name; 687 info->name = i->name;
688 info->address = net::IPAddressToString(i->address); 688 info->address = net::IPAddressToString(i->address);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 return; 882 return;
883 } 883 }
884 884
885 base::ListValue* values = new base::ListValue(); 885 base::ListValue* values = new base::ListValue();
886 values->AppendStrings((std::vector<std::string>&)static_cast<UDPSocket*>( 886 values->AppendStrings((std::vector<std::string>&)static_cast<UDPSocket*>(
887 socket)->GetJoinedGroups()); 887 socket)->GetJoinedGroups());
888 SetResult(values); 888 SetResult(values);
889 } 889 }
890 890
891 } // namespace extensions 891 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/dns/dns_api.cc ('k') | extensions/browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698