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

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

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review Created 9 years, 4 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 | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/browser/plugin_prefs.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 //------------------------------------------------------------------------------ 5 //------------------------------------------------------------------------------
6 // Description of the life cycle of a instance of MetricsService. 6 // Description of the life cycle of a instance of MetricsService.
7 // 7 //
8 // OVERVIEW 8 // OVERVIEW
9 // 9 //
10 // A MetricsService instance is typically created at application startup. It 10 // A MetricsService instance is typically created at application startup. It
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 ScheduleNextStateSave(); 1584 ScheduleNextStateSave();
1585 } 1585 }
1586 1586
1587 void MetricsService::RecordPluginChanges(PrefService* pref) { 1587 void MetricsService::RecordPluginChanges(PrefService* pref) {
1588 ListPrefUpdate update(pref, prefs::kStabilityPluginStats); 1588 ListPrefUpdate update(pref, prefs::kStabilityPluginStats);
1589 ListValue* plugins = update.Get(); 1589 ListValue* plugins = update.Get();
1590 DCHECK(plugins); 1590 DCHECK(plugins);
1591 1591
1592 for (ListValue::iterator value_iter = plugins->begin(); 1592 for (ListValue::iterator value_iter = plugins->begin();
1593 value_iter != plugins->end(); ++value_iter) { 1593 value_iter != plugins->end(); ++value_iter) {
1594 if (!(*value_iter)->IsType(Value::TYPE_DICTIONARY)) { 1594 if (!(*value_iter)->IsDictionary()) {
1595 NOTREACHED(); 1595 NOTREACHED();
1596 continue; 1596 continue;
1597 } 1597 }
1598 1598
1599 DictionaryValue* plugin_dict = static_cast<DictionaryValue*>(*value_iter); 1599 DictionaryValue* plugin_dict = static_cast<DictionaryValue*>(*value_iter);
1600 std::string plugin_name; 1600 std::string plugin_name;
1601 plugin_dict->GetString(prefs::kStabilityPluginName, &plugin_name); 1601 plugin_dict->GetString(prefs::kStabilityPluginName, &plugin_name);
1602 if (plugin_name.empty()) { 1602 if (plugin_name.empty()) {
1603 NOTREACHED(); 1603 NOTREACHED();
1604 continue; 1604 continue;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 thread_id = base::PlatformThread::CurrentId(); 1693 thread_id = base::PlatformThread::CurrentId();
1694 return base::PlatformThread::CurrentId() == thread_id; 1694 return base::PlatformThread::CurrentId() == thread_id;
1695 } 1695 }
1696 1696
1697 #if defined(OS_CHROMEOS) 1697 #if defined(OS_CHROMEOS)
1698 void MetricsService::StartExternalMetrics() { 1698 void MetricsService::StartExternalMetrics() {
1699 external_metrics_ = new chromeos::ExternalMetrics; 1699 external_metrics_ = new chromeos::ExternalMetrics;
1700 external_metrics_->Start(); 1700 external_metrics_->Start();
1701 } 1701 }
1702 #endif 1702 #endif
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log.cc ('k') | chrome/browser/plugin_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698