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

Side by Side Diff: chrome/browser/chromeos/web_socket_proxy.cc

Issue 9004051: Replace MessageLoop::DeleteSoon implementation with one that uses base::Bind. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final Created 8 years, 11 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/web_socket_proxy.h" 5 #include "chrome/browser/chromeos/web_socket_proxy.h"
6 6
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "base/base64.h" 25 #include "base/base64.h"
26 #include "base/basictypes.h" 26 #include "base/basictypes.h"
27 #include "base/bind.h" 27 #include "base/bind.h"
28 #include "base/bind_helpers.h" 28 #include "base/bind_helpers.h"
29 #include "base/lazy_instance.h" 29 #include "base/lazy_instance.h"
30 #include "base/logging.h" 30 #include "base/logging.h"
31 #include "base/memory/ref_counted.h" 31 #include "base/memory/ref_counted.h"
32 #include "base/memory/scoped_ptr.h" 32 #include "base/memory/scoped_ptr.h"
33 #include "base/memory/weak_ptr.h" 33 #include "base/memory/weak_ptr.h"
34 #include "base/message_loop.h" 34 #include "base/message_loop.h"
35 #include "base/message_loop_helpers.h"
35 #include "base/sha1.h" 36 #include "base/sha1.h"
36 #include "base/stl_util.h" 37 #include "base/stl_util.h"
37 #include "base/string_number_conversions.h" 38 #include "base/string_number_conversions.h"
38 #include "base/string_util.h" 39 #include "base/string_util.h"
39 #include "base/sys_byteorder.h" 40 #include "base/sys_byteorder.h"
40 #include "chrome/browser/chromeos/web_socket_proxy_helper.h" 41 #include "chrome/browser/chromeos/web_socket_proxy_helper.h"
41 #include "chrome/browser/internal_auth.h" 42 #include "chrome/browser/internal_auth.h"
42 #include "chrome/common/chrome_notification_types.h" 43 #include "chrome/common/chrome_notification_types.h"
43 #include "chrome/common/url_constants.h" 44 #include "chrome/common/url_constants.h"
44 #include "content/public/browser/browser_thread.h" 45 #include "content/public/browser/browser_thread.h"
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 int read_pipe_; 794 int read_pipe_;
794 int write_pipe_; 795 int write_pipe_;
795 bool is_socket_read_pending_; 796 bool is_socket_read_pending_;
796 bool is_socket_write_pending_; 797 bool is_socket_write_pending_;
797 bool is_read_pipe_blocked_; 798 bool is_read_pipe_blocked_;
798 bool is_write_pipe_blocked_; 799 bool is_write_pipe_blocked_;
799 base::WeakPtrFactory<SSLChan> weak_factory_; 800 base::WeakPtrFactory<SSLChan> weak_factory_;
800 MessageLoopForIO::FileDescriptorWatcher read_pipe_controller_; 801 MessageLoopForIO::FileDescriptorWatcher read_pipe_controller_;
801 MessageLoopForIO::FileDescriptorWatcher write_pipe_controller_; 802 MessageLoopForIO::FileDescriptorWatcher write_pipe_controller_;
802 803
803 friend class DeleteTask<SSLChan>; 804 friend class base::DeleteHelper<SSLChan>;
804 DISALLOW_COPY_AND_ASSIGN(SSLChan); 805 DISALLOW_COPY_AND_ASSIGN(SSLChan);
805 }; 806 };
806 807
807 Serv::Serv(const std::vector<std::string>& allowed_origins) 808 Serv::Serv(const std::vector<std::string>& allowed_origins)
808 : allowed_origins_(allowed_origins), 809 : allowed_origins_(allowed_origins),
809 evbase_(NULL), 810 evbase_(NULL),
810 listening_sock_(-1), 811 listening_sock_(-1),
811 extra_listening_sock_(-1), 812 extra_listening_sock_(-1),
812 shutdown_requested_(false) { 813 shutdown_requested_(false) {
813 std::sort(allowed_origins_.begin(), allowed_origins_.end()); 814 std::sort(allowed_origins_.begin(), allowed_origins_.end());
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 1916
1916 void WebSocketProxy::Shutdown() { 1917 void WebSocketProxy::Shutdown() {
1917 static_cast<Serv*>(impl_)->Shutdown(); 1918 static_cast<Serv*>(impl_)->Shutdown();
1918 } 1919 }
1919 1920
1920 void WebSocketProxy::OnNetworkChange() { 1921 void WebSocketProxy::OnNetworkChange() {
1921 static_cast<Serv*>(impl_)->OnNetworkChange(); 1922 static_cast<Serv*>(impl_)->OnNetworkChange();
1922 } 1923 }
1923 1924
1924 } // namespace chromeos 1925 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screen_locker.h ('k') | chrome/browser/ui/views/browser_actions_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698