| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 void AppendHeader(std::string* output, int refresh, | 396 void AppendHeader(std::string* output, int refresh, |
| 397 const std::string& unescaped_title) { | 397 const std::string& unescaped_title) { |
| 398 output->append("<!DOCTYPE HTML>\n<html>\n<head>\n"); | 398 output->append("<!DOCTYPE HTML>\n<html>\n<head>\n"); |
| 399 if (!unescaped_title.empty()) { | 399 if (!unescaped_title.empty()) { |
| 400 output->append("<title>"); | 400 output->append("<title>"); |
| 401 output->append(EscapeForHTML(unescaped_title)); | 401 output->append(EscapeForHTML(unescaped_title)); |
| 402 output->append("</title>\n"); | 402 output->append("</title>\n"); |
| 403 } | 403 } |
| 404 output->append("<meta charset=\"utf-8\">\n"); | 404 output->append("<meta charset=\"utf-8\">\n"); |
| 405 output->append(ResourceBundle::GetSharedInstance().GetRawDataResource( | |
| 406 IDR_CONTENT_SECURITY_POLICY_HTML).as_string()); | |
| 407 if (refresh > 0) { | 405 if (refresh > 0) { |
| 408 output->append("<meta http-equiv=\"refresh\" content=\""); | 406 output->append("<meta http-equiv=\"refresh\" content=\""); |
| 409 output->append(base::IntToString(refresh)); | 407 output->append(base::IntToString(refresh)); |
| 410 output->append("\"/>\n"); | 408 output->append("\"/>\n"); |
| 411 } | 409 } |
| 412 } | 410 } |
| 413 | 411 |
| 414 void AppendBody(std::string *output) { | 412 void AppendBody(std::string *output) { |
| 415 output->append("</head>\n<body>\n"); | 413 output->append("</head>\n<body>\n"); |
| 416 } | 414 } |
| (...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1606 return false; | 1604 return false; |
| 1607 } | 1605 } |
| 1608 | 1606 |
| 1609 std::vector<std::string> ChromePaths() { | 1607 std::vector<std::string> ChromePaths() { |
| 1610 std::vector<std::string> paths; | 1608 std::vector<std::string> paths; |
| 1611 paths.reserve(arraysize(kChromePaths)); | 1609 paths.reserve(arraysize(kChromePaths)); |
| 1612 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1610 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 1613 paths.push_back(kChromePaths[i]); | 1611 paths.push_back(kChromePaths[i]); |
| 1614 return paths; | 1612 return paths; |
| 1615 } | 1613 } |
| OLD | NEW |