| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui/options/website_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/website_settings_handler.h" |
| 6 | 6 |
| 7 #include "chrome/browser/content_settings/content_settings_utils.h" | 7 #include "chrome/browser/content_settings/content_settings_utils.h" |
| 8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/grit/generated_resources.h" |
| 10 #include "content/public/browser/web_ui.h" | 11 #include "content/public/browser/web_ui.h" |
| 11 #include "grit/generated_resources.h" | |
| 12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
| 13 #include "ui/base/l10n/time_format.h" | 13 #include "ui/base/l10n/time_format.h" |
| 14 #include "ui/base/text/bytes_formatting.h" | 14 #include "ui/base/text/bytes_formatting.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 const int kHttpPort = 80; | 18 const int kHttpPort = 80; |
| 19 const int kHttpsPort = 443; | 19 const int kHttpsPort = 443; |
| 20 const char kPreferencesSource[] = "preference"; | 20 const char kPreferencesSource[] = "preference"; |
| 21 const char kStorage[] = "storage"; | 21 const char kStorage[] = "storage"; |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 "usage", new base::FundamentalValue(static_cast<double>(it->size))); | 415 "usage", new base::FundamentalValue(static_cast<double>(it->size))); |
| 416 origin_entry->SetWithoutPathExpansion( | 416 origin_entry->SetWithoutPathExpansion( |
| 417 "usageString", new base::StringValue(ui::FormatBytes(it->size))); | 417 "usageString", new base::StringValue(ui::FormatBytes(it->size))); |
| 418 local_storage_map.SetWithoutPathExpansion(origin, origin_entry); | 418 local_storage_map.SetWithoutPathExpansion(origin, origin_entry); |
| 419 } | 419 } |
| 420 web_ui()->CallJavascriptFunction("WebsiteSettingsManager.populateOrigins", | 420 web_ui()->CallJavascriptFunction("WebsiteSettingsManager.populateOrigins", |
| 421 local_storage_map); | 421 local_storage_map); |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace options | 424 } // namespace options |
| OLD | NEW |