| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/ui/webui/about_ui.h" | 5 #include "ios/chrome/browser/ui/webui/about_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/format_macros.h" | 12 #include "base/format_macros.h" |
| 13 #include "base/i18n/number_formatting.h" | 13 #include "base/i18n/number_formatting.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/metrics/statistics_recorder.h" | 15 #include "base/metrics/statistics_recorder.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "google_apis/gaia/google_service_auth_error.h" | 17 #include "google_apis/gaia/google_service_auth_error.h" |
| 18 #include "grit/components_resources.h" | 18 #include "grit/components_resources.h" |
| 19 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 19 #include "ios/chrome/browser/chrome_url_constants.h" | 20 #include "ios/chrome/browser/chrome_url_constants.h" |
| 20 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 21 #include "ios/web/public/url_data_source_ios.h" | 21 #include "ios/web/public/url_data_source_ios.h" |
| 22 #include "net/base/escape.h" | 22 #include "net/base/escape.h" |
| 23 #include "ui/base/device_form_factor.h" | 23 #include "ui/base/device_form_factor.h" |
| 24 #include "ui/base/resource/resource_bundle.h" | 24 #include "ui/base/resource/resource_bundle.h" |
| 25 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const char kCreditsJsPath[] = "credits.js"; | 29 const char kCreditsJsPath[] = "credits.js"; |
| 30 const char kStringsJsPath[] = "strings.js"; | 30 const char kStringsJsPath[] = "strings.js"; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 return web::URLDataSourceIOS::ShouldDenyXFrameOptions(); | 156 return web::URLDataSourceIOS::ShouldDenyXFrameOptions(); |
| 157 } | 157 } |
| 158 | 158 |
| 159 AboutUI::AboutUI(web::WebUIIOS* web_ui, const std::string& name) | 159 AboutUI::AboutUI(web::WebUIIOS* web_ui, const std::string& name) |
| 160 : web::WebUIIOSController(web_ui) { | 160 : web::WebUIIOSController(web_ui) { |
| 161 web::URLDataSourceIOS::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), | 161 web::URLDataSourceIOS::Add(ios::ChromeBrowserState::FromWebUIIOS(web_ui), |
| 162 new AboutUIHTMLSource(name)); | 162 new AboutUIHTMLSource(name)); |
| 163 } | 163 } |
| 164 | 164 |
| 165 AboutUI::~AboutUI() {} | 165 AboutUI::~AboutUI() {} |
| OLD | NEW |