Chromium Code Reviews| Index: chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc |
| diff --git a/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc b/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc |
| index 412579461379c95333833a5cc220588830a831e0..e15f024f0ec98db3140b979bbc7911e137d9566c 100644 |
| --- a/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc |
| +++ b/chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc |
| @@ -34,33 +34,33 @@ std::string GetHash( |
| namespace chrome { |
| ChromeZoomLevelPrefs::ChromeZoomLevelPrefs(PrefService* pref_service, |
| - const base::FilePath& profile_path) |
| + const base::FilePath& profile_path, |
| + const base::FilePath& partition_path) |
| : pref_service_(pref_service), |
| - profile_path_(profile_path), |
| host_zoom_map_(nullptr) { |
| DCHECK(pref_service_); |
| + |
| + DCHECK(!partition_path.empty()); |
| + DCHECK((partition_path == profile_path) || |
| + profile_path.IsParent(partition_path)); |
| + // Create a partition_key string with no '.'s in it. For the default |
| + // StoragePartition, this string will always be "0". |
| + base::FilePath partition_relative_path; |
| + profile_path.AppendRelativePath(partition_path, &partition_relative_path); |
| + partition_key_ = GetHash(partition_relative_path); |
| + |
| } |
| ChromeZoomLevelPrefs::~ChromeZoomLevelPrefs() { |
| } |
| -void ChromeZoomLevelPrefs::InitPrefsAndCopyToHostZoomMap( |
| - const base::FilePath& partition_path, |
| +void ChromeZoomLevelPrefs::InitHostZoomMap( |
|
sky
2014/11/11 20:21:56
Make declaration/definition position match.
wjmaclean
2014/11/11 20:59:09
Done.
|
| content::HostZoomMap* host_zoom_map) { |
| - DCHECK(!partition_path.empty()); |
| - DCHECK((partition_path == profile_path_) || |
| - profile_path_.IsParent(partition_path)); |
| // This init function must be called only once. |
| DCHECK(!host_zoom_map_); |
| DCHECK(host_zoom_map); |
| host_zoom_map_ = host_zoom_map; |
| - // Create a partition_key string with no '.'s in it. For the default |
| - // StoragePartition, this string will always be "0". |
| - base::FilePath partition_relative_path; |
| - profile_path_.AppendRelativePath(partition_path, &partition_relative_path); |
| - partition_key_ = GetHash(partition_relative_path); |
| - |
| // Initialize the default zoom level. |
| host_zoom_map_->SetDefaultZoomLevel(GetDefaultZoomLevelPref()); |