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

Side by Side Diff: net/proxy/proxy_resolver_js_bindings.cc

Issue 10066045: RefCounted types should not have public destructors, net/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 (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 "net/proxy/proxy_resolver_js_bindings.h" 5 #include "net/proxy/proxy_resolver_js_bindings.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 virtual Value* ToValue() const OVERRIDE { 39 virtual Value* ToValue() const OVERRIDE {
40 DictionaryValue* dict = new DictionaryValue(); 40 DictionaryValue* dict = new DictionaryValue();
41 dict->SetInteger("line_number", line_number_); 41 dict->SetInteger("line_number", line_number_);
42 dict->SetString("message", message_); 42 dict->SetString("message", message_);
43 return dict; 43 return dict;
44 } 44 }
45 45
46 private: 46 private:
47 virtual ~ErrorNetlogParams() {}
48
47 const int line_number_; 49 const int line_number_;
48 const string16 message_; 50 const string16 message_;
49 51
50 DISALLOW_COPY_AND_ASSIGN(ErrorNetlogParams); 52 DISALLOW_COPY_AND_ASSIGN(ErrorNetlogParams);
51 }; 53 };
52 54
53 // Event parameters for a PAC alert(). 55 // Event parameters for a PAC alert().
54 class AlertNetlogParams : public NetLog::EventParameters { 56 class AlertNetlogParams : public NetLog::EventParameters {
55 public: 57 public:
56 explicit AlertNetlogParams(const string16& message) : message_(message) { 58 explicit AlertNetlogParams(const string16& message) : message_(message) {
57 } 59 }
58 60
59 virtual Value* ToValue() const OVERRIDE { 61 virtual Value* ToValue() const OVERRIDE {
60 DictionaryValue* dict = new DictionaryValue(); 62 DictionaryValue* dict = new DictionaryValue();
61 dict->SetString("message", message_); 63 dict->SetString("message", message_);
62 return dict; 64 return dict;
63 } 65 }
64 66
65 private: 67 private:
68 virtual ~AlertNetlogParams() {}
69
66 const string16 message_; 70 const string16 message_;
67 71
68 DISALLOW_COPY_AND_ASSIGN(AlertNetlogParams); 72 DISALLOW_COPY_AND_ASSIGN(AlertNetlogParams);
69 }; 73 };
70 74
71 // ProxyResolverJSBindings implementation. 75 // ProxyResolverJSBindings implementation.
72 class DefaultJSBindings : public ProxyResolverJSBindings { 76 class DefaultJSBindings : public ProxyResolverJSBindings {
73 public: 77 public:
74 DefaultJSBindings(SyncHostResolver* host_resolver, 78 DefaultJSBindings(SyncHostResolver* host_resolver,
75 NetLog* net_log, 79 NetLog* net_log,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 317
314 // static 318 // static
315 ProxyResolverJSBindings* ProxyResolverJSBindings::CreateDefault( 319 ProxyResolverJSBindings* ProxyResolverJSBindings::CreateDefault(
316 SyncHostResolver* host_resolver, 320 SyncHostResolver* host_resolver,
317 NetLog* net_log, 321 NetLog* net_log,
318 ProxyResolverErrorObserver* error_observer) { 322 ProxyResolverErrorObserver* error_observer) {
319 return new DefaultJSBindings(host_resolver, net_log, error_observer); 323 return new DefaultJSBindings(host_resolver, net_log, error_observer);
320 } 324 }
321 325
322 } // namespace net 326 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698