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

Side by Side Diff: chrome/browser/extensions/api/cast_channel/cast_socket.cc

Issue 140613002: Cleanup: Replace &LazyInstance::Get() with LazyInstance::Pointer(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/api/cast_channel/cast_socket.h" 5 #include "chrome/browser/extensions/api/cast_channel/cast_socket.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 namespace extensions { 50 namespace extensions {
51 51
52 static base::LazyInstance< 52 static base::LazyInstance<
53 ProfileKeyedAPIFactory<ApiResourceManager<api::cast_channel::CastSocket> > > 53 ProfileKeyedAPIFactory<ApiResourceManager<api::cast_channel::CastSocket> > >
54 g_factory = LAZY_INSTANCE_INITIALIZER; 54 g_factory = LAZY_INSTANCE_INITIALIZER;
55 55
56 // static 56 // static
57 template <> 57 template <>
58 ProfileKeyedAPIFactory<ApiResourceManager<api::cast_channel::CastSocket> >* 58 ProfileKeyedAPIFactory<ApiResourceManager<api::cast_channel::CastSocket> >*
59 ApiResourceManager<api::cast_channel::CastSocket>::GetFactoryInstance() { 59 ApiResourceManager<api::cast_channel::CastSocket>::GetFactoryInstance() {
60 return &g_factory.Get(); 60 return g_factory.Pointer();
61 } 61 }
62 62
63 namespace api { 63 namespace api {
64 namespace cast_channel { 64 namespace cast_channel {
65 65
66 const uint32 kMaxMessageSize = 65536; 66 const uint32 kMaxMessageSize = 65536;
67 67
68 CastSocket::CastSocket(const std::string& owner_extension_id, 68 CastSocket::CastSocket(const std::string& owner_extension_id,
69 const GURL& url, 69 const GURL& url,
70 CastSocket::Delegate* delegate, 70 CastSocket::Delegate* delegate,
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 io_buffer = new net::DrainableIOBuffer(new net::StringIOBuffer(message_data), 670 io_buffer = new net::DrainableIOBuffer(new net::StringIOBuffer(message_data),
671 message_data.size()); 671 message_data.size());
672 return true; 672 return true;
673 } 673 }
674 674
675 CastSocket::WriteRequest::~WriteRequest() { } 675 CastSocket::WriteRequest::~WriteRequest() { }
676 676
677 } // namespace cast_channel 677 } // namespace cast_channel
678 } // namespace api 678 } // namespace api
679 } // namespace extensions 679 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698