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

Side by Side Diff: chrome/browser/metrics/extensions_metrics_provider.cc

Issue 312583002: Move MetricsStateManager into the Metrics component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 6 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/metrics/extensions_metrics_provider.h" 5 #include "chrome/browser/metrics/extensions_metrics_provider.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/metrics/metrics_state_manager.h"
14 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
15 #include "components/metrics/metrics_log_base.h" 14 #include "components/metrics/metrics_log_base.h"
15 #include "components/metrics/metrics_state_manager.h"
16 #include "components/metrics/proto/system_profile.pb.h" 16 #include "components/metrics/proto/system_profile.pb.h"
17 #include "extensions/browser/extension_registry.h" 17 #include "extensions/browser/extension_registry.h"
18 #include "extensions/common/extension_set.h" 18 #include "extensions/common/extension_set.h"
19 #include "third_party/smhasher/src/City.h" 19 #include "third_party/smhasher/src/City.h"
20 20
21 namespace { 21 namespace {
22 22
23 // The number of possible hash keys that a client may use. The UMA client_id 23 // The number of possible hash keys that a client may use. The UMA client_id
24 // value is reduced modulo this value to produce the key used by that 24 // value is reduced modulo this value to produce the key used by that
25 // particular client. 25 // particular client.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 it != extensions->end(); 109 it != extensions->end();
110 ++it) { 110 ++it) {
111 buckets.insert(HashExtension((*it)->id(), client_key)); 111 buckets.insert(HashExtension((*it)->id(), client_key));
112 } 112 }
113 113
114 for (std::set<int>::const_iterator it = buckets.begin(); it != buckets.end(); 114 for (std::set<int>::const_iterator it = buckets.begin(); it != buckets.end();
115 ++it) { 115 ++it) {
116 system_profile->add_occupied_extension_bucket(*it); 116 system_profile->add_occupied_extension_bucket(*it);
117 } 117 }
118 } 118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698