| OLD | NEW |
| 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 #include "chrome/common/metrics/metrics_log_base.h" | 5 #include "chrome/common/metrics/metrics_log_base.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/md5.h" | 9 #include "base/md5.h" |
| 10 #include "base/perftimer.h" | 10 #include "base/perftimer.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 case content::PAGE_TRANSITION_AUTO_SUBFRAME: | 341 case content::PAGE_TRANSITION_AUTO_SUBFRAME: |
| 342 case content::PAGE_TRANSITION_RELOAD: | 342 case content::PAGE_TRANSITION_RELOAD: |
| 343 origin_string = "refresh"; | 343 origin_string = "refresh"; |
| 344 break; | 344 break; |
| 345 | 345 |
| 346 case content::PAGE_TRANSITION_GENERATED: | 346 case content::PAGE_TRANSITION_GENERATED: |
| 347 case content::PAGE_TRANSITION_KEYWORD: | 347 case content::PAGE_TRANSITION_KEYWORD: |
| 348 origin_string = "global-history"; | 348 origin_string = "global-history"; |
| 349 break; | 349 break; |
| 350 | 350 |
| 351 case content::PAGE_TRANSITION_START_PAGE: | 351 case content::PAGE_TRANSITION_AUTO_TOPLEVEL: |
| 352 origin_string = "start-page"; | 352 origin_string = "auto-toplevel"; |
| 353 break; | 353 break; |
| 354 | 354 |
| 355 case content::PAGE_TRANSITION_FORM_SUBMIT: | 355 case content::PAGE_TRANSITION_FORM_SUBMIT: |
| 356 origin_string = "form-submit"; | 356 origin_string = "form-submit"; |
| 357 break; | 357 break; |
| 358 | 358 |
| 359 default: | 359 default: |
| 360 NOTREACHED() << "Received an unknown page transition type: " << | 360 NOTREACHED() << "Received an unknown page transition type: " << |
| 361 content::PageTransitionStripQualifier(origin); | 361 content::PageTransitionStripQualifier(origin); |
| 362 } | 362 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 for (size_t i = 0; i < histogram.bucket_count(); ++i) { | 488 for (size_t i = 0; i < histogram.bucket_count(); ++i) { |
| 489 if (snapshot.counts(i)) { | 489 if (snapshot.counts(i)) { |
| 490 HistogramEventProto::Bucket* bucket = histogram_proto->add_bucket(); | 490 HistogramEventProto::Bucket* bucket = histogram_proto->add_bucket(); |
| 491 bucket->set_min(histogram.ranges(i)); | 491 bucket->set_min(histogram.ranges(i)); |
| 492 bucket->set_max(histogram.ranges(i + 1)); | 492 bucket->set_max(histogram.ranges(i + 1)); |
| 493 bucket->set_bucket_index(i); | 493 bucket->set_bucket_index(i); |
| 494 bucket->set_count(snapshot.counts(i)); | 494 bucket->set_count(snapshot.counts(i)); |
| 495 } | 495 } |
| 496 } | 496 } |
| 497 } | 497 } |
| OLD | NEW |