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

Side by Side Diff: chrome/browser/net/net_error_tab_helper.h

Issue 575993002: Fix WeakPtrFactory member ordering in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/net/dns_probe_runner.cc ('k') | chrome/browser/net/net_error_tab_helper.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 #ifndef CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_
6 #define CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ 6 #define CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 private: 82 private:
83 friend class content::WebContentsUserData<NetErrorTabHelper>; 83 friend class content::WebContentsUserData<NetErrorTabHelper>;
84 84
85 void OnMainFrameDnsError(); 85 void OnMainFrameDnsError();
86 86
87 void InitializePref(content::WebContents* contents); 87 void InitializePref(content::WebContents* contents);
88 bool ProbesAllowed() const; 88 bool ProbesAllowed() const;
89 89
90 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_;
91
92 // True if the last provisional load that started was for an error page. 90 // True if the last provisional load that started was for an error page.
93 bool is_error_page_; 91 bool is_error_page_;
94 92
95 // True if the helper has seen a main frame page load fail with a DNS error, 93 // True if the helper has seen a main frame page load fail with a DNS error,
96 // but has not yet seen a new page commit successfully afterwards. 94 // but has not yet seen a new page commit successfully afterwards.
97 bool dns_error_active_; 95 bool dns_error_active_;
98 96
99 // True if the helper has seen an error page commit while |dns_error_active_| 97 // True if the helper has seen an error page commit while |dns_error_active_|
100 // is true. (This should never be true if |dns_error_active_| is false.) 98 // is true. (This should never be true if |dns_error_active_| is false.)
101 bool dns_error_page_committed_; 99 bool dns_error_page_committed_;
102 100
103 // The status of a DNS probe that may or may not have started or finished. 101 // The status of a DNS probe that may or may not have started or finished.
104 // Since the renderer can change out from under the helper (in cross-process 102 // Since the renderer can change out from under the helper (in cross-process
105 // navigations), it re-sends the status whenever an error page commits. 103 // navigations), it re-sends the status whenever an error page commits.
106 chrome_common_net::DnsProbeStatus dns_probe_status_; 104 chrome_common_net::DnsProbeStatus dns_probe_status_;
107 105
108 // Optional callback for browser test to snoop on outgoing NetErrorInfo IPCs. 106 // Optional callback for browser test to snoop on outgoing NetErrorInfo IPCs.
109 DnsProbeStatusSnoopCallback dns_probe_status_snoop_callback_; 107 DnsProbeStatusSnoopCallback dns_probe_status_snoop_callback_;
110 108
111 // "Use a web service to resolve navigation errors" preference is required 109 // "Use a web service to resolve navigation errors" preference is required
112 // to allow probes. 110 // to allow probes.
113 BooleanPrefMember resolve_errors_with_web_service_; 111 BooleanPrefMember resolve_errors_with_web_service_;
114 112
113 base::WeakPtrFactory<NetErrorTabHelper> weak_factory_;
114
115 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper); 115 DISALLOW_COPY_AND_ASSIGN(NetErrorTabHelper);
116 }; 116 };
117 117
118 } // namespace chrome_browser_net 118 } // namespace chrome_browser_net
119 119
120 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_ 120 #endif // CHROME_BROWSER_NET_NET_ERROR_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/dns_probe_runner.cc ('k') | chrome/browser/net/net_error_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698