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

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: Deprecated cookiestore fix Created 8 years, 7 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
« no previous file with comments | « net/proxy/proxy_config_service_mac.cc ('k') | net/proxy/proxy_script_decider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 message_(message) { 36 message_(message) {
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 protected:
47 virtual ~ErrorNetlogParams() {}
48
46 private: 49 private:
47 const int line_number_; 50 const int line_number_;
48 const string16 message_; 51 const string16 message_;
49 52
50 DISALLOW_COPY_AND_ASSIGN(ErrorNetlogParams); 53 DISALLOW_COPY_AND_ASSIGN(ErrorNetlogParams);
51 }; 54 };
52 55
53 // Event parameters for a PAC alert(). 56 // Event parameters for a PAC alert().
54 class AlertNetlogParams : public NetLog::EventParameters { 57 class AlertNetlogParams : public NetLog::EventParameters {
55 public: 58 public:
56 explicit AlertNetlogParams(const string16& message) : message_(message) { 59 explicit AlertNetlogParams(const string16& message) : message_(message) {}
57 }
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
67 protected:
68 virtual ~AlertNetlogParams() {}
69
65 private: 70 private:
66 const string16 message_; 71 const string16 message_;
67 72
68 DISALLOW_COPY_AND_ASSIGN(AlertNetlogParams); 73 DISALLOW_COPY_AND_ASSIGN(AlertNetlogParams);
69 }; 74 };
70 75
71 // ProxyResolverJSBindings implementation. 76 // ProxyResolverJSBindings implementation.
72 class DefaultJSBindings : public ProxyResolverJSBindings { 77 class DefaultJSBindings : public ProxyResolverJSBindings {
73 public: 78 public:
74 DefaultJSBindings(SyncHostResolver* host_resolver, 79 DefaultJSBindings(SyncHostResolver* host_resolver,
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 318
314 // static 319 // static
315 ProxyResolverJSBindings* ProxyResolverJSBindings::CreateDefault( 320 ProxyResolverJSBindings* ProxyResolverJSBindings::CreateDefault(
316 SyncHostResolver* host_resolver, 321 SyncHostResolver* host_resolver,
317 NetLog* net_log, 322 NetLog* net_log,
318 ProxyResolverErrorObserver* error_observer) { 323 ProxyResolverErrorObserver* error_observer) {
319 return new DefaultJSBindings(host_resolver, net_log, error_observer); 324 return new DefaultJSBindings(host_resolver, net_log, error_observer);
320 } 325 }
321 326
322 } // namespace net 327 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_config_service_mac.cc ('k') | net/proxy/proxy_script_decider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698