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

Side by Side Diff: chrome/browser/io_thread.h

Issue 2517363002: Decouple Metrics Initialization from IO Thread Initialization (Closed)
Patch Set: Add One Level of Indirection Created 4 years 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
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_IO_THREAD_H_ 5 #ifndef CHROME_BROWSER_IO_THREAD_H_
6 #define CHROME_BROWSER_IO_THREAD_H_ 6 #define CHROME_BROWSER_IO_THREAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // visited sites on about:net-internals/#dns and about:dns pages. Must be 232 // visited sites on about:net-internals/#dns and about:dns pages. Must be
233 // called on the IO thread. If |host_filter| is not null, only hosts matched 233 // called on the IO thread. If |host_filter| is not null, only hosts matched
234 // by it are deleted from the cache. 234 // by it are deleted from the cache.
235 void ClearHostCache( 235 void ClearHostCache(
236 const base::Callback<bool(const std::string&)>& host_filter); 236 const base::Callback<bool(const std::string&)>& host_filter);
237 237
238 const net::HttpNetworkSession::Params& NetworkSessionParams() const; 238 const net::HttpNetworkSession::Params& NetworkSessionParams() const;
239 239
240 base::TimeTicks creation_time() const; 240 base::TimeTicks creation_time() const;
241 241
242 // Returns the callback for updating data use prefs.
243 const metrics::UpdateUsagePrefCallbackType& GetMetricsDataUseForwarder();
244
245 // Registers the |observer| for new STH notifications. 242 // Registers the |observer| for new STH notifications.
246 void RegisterSTHObserver(net::ct::STHObserver* observer); 243 void RegisterSTHObserver(net::ct::STHObserver* observer);
247 244
248 // Un-registers the |observer|. 245 // Un-registers the |observer|.
249 void UnregisterSTHObserver(net::ct::STHObserver* observer); 246 void UnregisterSTHObserver(net::ct::STHObserver* observer);
250 247
251 // Returns true if the indicated proxy resolution features are 248 // Returns true if the indicated proxy resolution features are
252 // enabled. These features are controlled through 249 // enabled. These features are controlled through
253 // preferences/policy/commandline. 250 // preferences/policy/commandline.
254 // 251 //
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 system_url_request_context_getter_; 390 system_url_request_context_getter_;
394 391
395 // True if QUIC is allowed by policy. 392 // True if QUIC is allowed by policy.
396 bool is_quic_allowed_by_policy_; 393 bool is_quic_allowed_by_policy_;
397 394
398 // True if HTTP/0.9 is allowed on non-default ports by policy. 395 // True if HTTP/0.9 is allowed on non-default ports by policy.
399 bool http_09_on_non_default_ports_enabled_; 396 bool http_09_on_non_default_ports_enabled_;
400 397
401 const base::TimeTicks creation_time_; 398 const base::TimeTicks creation_time_;
402 399
403 // Callback for updating data use prefs which needs to be initialized on UI
404 // thread and passed to |DataUseNetworkDelegate|.
405 metrics::UpdateUsagePrefCallbackType metrics_data_use_forwarder_;
406
407 base::WeakPtrFactory<IOThread> weak_factory_; 400 base::WeakPtrFactory<IOThread> weak_factory_;
408 401
409 DISALLOW_COPY_AND_ASSIGN(IOThread); 402 DISALLOW_COPY_AND_ASSIGN(IOThread);
410 }; 403 };
411 404
412 #endif // CHROME_BROWSER_IO_THREAD_H_ 405 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698