| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser/prefs/browser_prefs.h" | 5 #include "chrome/browser/prefs/browser_prefs.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 677 |
| 678 const base::DictionaryValue* host_zoom_dictionary = | 678 const base::DictionaryValue* host_zoom_dictionary = |
| 679 prefs->GetDictionary(prefs::kPerHostZoomLevelsDeprecated); | 679 prefs->GetDictionary(prefs::kPerHostZoomLevelsDeprecated); |
| 680 // Collect stats on frequency with which migrations are occuring. This measure | 680 // Collect stats on frequency with which migrations are occuring. This measure |
| 681 // is not perfect, since it will consider an un-migrated user with only | 681 // is not perfect, since it will consider an un-migrated user with only |
| 682 // default value as being already migrated, but it will catch all non-trivial | 682 // default value as being already migrated, but it will catch all non-trivial |
| 683 // migrations. | 683 // migrations. |
| 684 migrated |= !host_zoom_dictionary->empty(); | 684 migrated |= !host_zoom_dictionary->empty(); |
| 685 UMA_HISTOGRAM_BOOLEAN("Settings.ZoomLevelPreferencesMigrated", migrated); | 685 UMA_HISTOGRAM_BOOLEAN("Settings.ZoomLevelPreferencesMigrated", migrated); |
| 686 | 686 |
| 687 zoom_level_prefs->ExtractPerHostZoomLevels(host_zoom_dictionary); | 687 zoom_level_prefs->ExtractPerHostZoomLevels( |
| 688 host_zoom_dictionary, prefs::kPerHostZoomLevelsDeprecated); |
| 688 | 689 |
| 689 // We're done migrating the profile per-host zoom level values, so we clear | 690 // We're done migrating the profile per-host zoom level values, so we clear |
| 690 // them all. | 691 // them all. |
| 691 DictionaryPrefUpdate host_zoom_dictionary_update( | 692 DictionaryPrefUpdate host_zoom_dictionary_update( |
| 692 prefs, prefs::kPerHostZoomLevelsDeprecated); | 693 prefs, prefs::kPerHostZoomLevelsDeprecated); |
| 693 host_zoom_dictionary_update->Clear(); | 694 host_zoom_dictionary_update->Clear(); |
| 694 } | 695 } |
| 695 | 696 |
| 696 } // namespace chrome | 697 } // namespace chrome |
| OLD | NEW |