OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); | 528 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); |
529 ++it) { | 529 ++it) { |
530 std::string action("AboutFlags_"); | 530 std::string action("AboutFlags_"); |
531 action += *it; | 531 action += *it; |
532 UserMetrics::RecordComputedAction(action); | 532 UserMetrics::RecordComputedAction(action); |
533 } | 533 } |
534 // Since flag metrics are recorded every startup, add a tick so that the | 534 // Since flag metrics are recorded every startup, add a tick so that the |
535 // stats can be made meaningful. | 535 // stats can be made meaningful. |
536 if (flags.size()) | 536 if (flags.size()) |
537 UserMetrics::RecordAction(UserMetricsAction("AboutFlags_StartupTick")); | 537 UserMetrics::RecordAction(UserMetricsAction("AboutFlags_StartupTick")); |
| 538 UserMetrics::RecordAction(UserMetricsAction("StartupTick")); |
538 } | 539 } |
539 | 540 |
540 ////////////////////////////////////////////////////////////////////////////// | 541 ////////////////////////////////////////////////////////////////////////////// |
541 // FlagsState implementation. | 542 // FlagsState implementation. |
542 | 543 |
543 namespace { | 544 namespace { |
544 | 545 |
545 void FlagsState::ConvertFlagsToSwitches( | 546 void FlagsState::ConvertFlagsToSwitches( |
546 PrefService* prefs, CommandLine* command_line) { | 547 PrefService* prefs, CommandLine* command_line) { |
547 if (command_line->HasSwitch(switches::kNoExperiments)) | 548 if (command_line->HasSwitch(switches::kNoExperiments)) |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 } | 689 } |
689 | 690 |
690 const Experiment* GetExperiments(size_t* count) { | 691 const Experiment* GetExperiments(size_t* count) { |
691 *count = num_experiments; | 692 *count = num_experiments; |
692 return experiments; | 693 return experiments; |
693 } | 694 } |
694 | 695 |
695 } // namespace testing | 696 } // namespace testing |
696 | 697 |
697 } // namespace about_flags | 698 } // namespace about_flags |
OLD | NEW |