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

Unified Diff: chrome/browser/net/websocket_experiment/websocket_experiment_runner.h

Issue 404022: Hold histograms in static variables instead of allocating heap. (Closed)
Patch Set: const kTimeBucketCount Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/websocket_experiment/websocket_experiment_runner.h
diff --git a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h
index efc5da2fddb9f1d29480e159e6b98eed8e479c3f..32dfc9580e4fb13cce621887afbb02ae86f472df 100644
--- a/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h
+++ b/chrome/browser/net/websocket_experiment/websocket_experiment_runner.h
@@ -37,8 +37,6 @@ class WebSocketExperimentRunner
void Cancel();
private:
- typedef std::map<std::string, linked_ptr<Histogram> > HistogramMap;
-
enum State {
STATE_NONE,
STATE_IDLE,
@@ -51,28 +49,16 @@ class WebSocketExperimentRunner
friend class base::RefCountedThreadSafe<WebSocketExperimentRunner>;
void InitConfig();
- void InitHistograms();
void DoLoop();
void OnTaskCompleted(int result);
void UpdateTaskResultHistogram(const WebSocketExperimentTask* task);
- template<class HistogramType, typename HistogramSample>
- void InitHistogram(const char* type_name,
- HistogramSample min, HistogramSample max,
- size_t bucket_count);
-
- Histogram* GetHistogram(const std::string& type_name) const;
-
Config config_;
State next_state_;
State task_state_;
scoped_ptr<WebSocketExperimentTask> task_;
net::CompletionCallbackImpl<WebSocketExperimentRunner> task_callback_;
- HistogramMap ws_histograms_;
- HistogramMap wss_histograms_;
- HistogramMap ws_nondefault_histograms_;
-
DISALLOW_COPY_AND_ASSIGN(WebSocketExperimentRunner);
};
« no previous file with comments | « no previous file | chrome/browser/net/websocket_experiment/websocket_experiment_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698