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 "net/base/sdch_manager.h" | 5 #include "net/base/sdch_manager.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 continue; | 251 continue; |
252 ++count; | 252 ++count; |
253 result->AddDictionary(entry.first, entry.second); | 253 result->AddDictionary(entry.first, entry.second); |
254 } | 254 } |
255 | 255 |
256 if (count == 0) | 256 if (count == 0) |
257 return NULL; | 257 return NULL; |
258 | 258 |
259 UMA_HISTOGRAM_COUNTS("Sdch3.Advertisement_Count", count); | 259 UMA_HISTOGRAM_COUNTS("Sdch3.Advertisement_Count", count); |
260 UMA_HISTOGRAM_BOOLEAN("Sdch3.AdvertisedWithSecureScheme", | 260 UMA_HISTOGRAM_BOOLEAN("Sdch3.AdvertisedWithSecureScheme", |
261 target_url.SchemeIsSecure()); | 261 target_url.SchemeIsCryptographic()); |
262 | 262 |
263 return result.Pass(); | 263 return result.Pass(); |
264 } | 264 } |
265 | 265 |
266 scoped_ptr<SdchManager::DictionarySet> | 266 scoped_ptr<SdchManager::DictionarySet> |
267 SdchManager::GetDictionarySetByHash( | 267 SdchManager::GetDictionarySetByHash( |
268 const GURL& target_url, | 268 const GURL& target_url, |
269 const std::string& server_hash, | 269 const std::string& server_hash, |
270 SdchProblemCode* problem_code) { | 270 SdchProblemCode* problem_code) { |
271 scoped_ptr<SdchManager::DictionarySet> result; | 271 scoped_ptr<SdchManager::DictionarySet> result; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 entry_dict->SetInteger("tries", it->second.count); | 488 entry_dict->SetInteger("tries", it->second.count); |
489 entry_dict->SetInteger("reason", it->second.reason); | 489 entry_dict->SetInteger("reason", it->second.reason); |
490 entry_list->Append(entry_dict.Pass()); | 490 entry_list->Append(entry_dict.Pass()); |
491 } | 491 } |
492 value->Set("blacklisted", entry_list.Pass()); | 492 value->Set("blacklisted", entry_list.Pass()); |
493 | 493 |
494 return value.Pass(); | 494 return value.Pass(); |
495 } | 495 } |
496 | 496 |
497 } // namespace net | 497 } // namespace net |
OLD | NEW |