Chromium Code Reviews| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 403 void AppendHeader(std::string* output, int refresh, | 403 void AppendHeader(std::string* output, int refresh, |
| 404 const std::string& unescaped_title) { | 404 const std::string& unescaped_title) { |
| 405 output->append("<!DOCTYPE HTML>\n<html>\n<head>\n"); | 405 output->append("<!DOCTYPE HTML>\n<html>\n<head>\n"); |
| 406 if (!unescaped_title.empty()) { | 406 if (!unescaped_title.empty()) { |
| 407 output->append("<title>"); | 407 output->append("<title>"); |
| 408 output->append(EscapeForHTML(unescaped_title)); | 408 output->append(EscapeForHTML(unescaped_title)); |
| 409 output->append("</title>\n"); | 409 output->append("</title>\n"); |
| 410 } | 410 } |
| 411 output->append( | 411 output->append( |
| 412 "<meta charset=\"utf-8\">\n<meta http-equiv=\"X-WebKit-CSP\" " | 412 "<meta charset=\"utf-8\">\n<meta http-equiv=\"X-WebKit-CSP\" " |
| 413 "content=\"object-src 'none'; script-src 'self' 'unsafe-eval'\">\n"); | 413 "content=\"object-src 'none'; " |
| 414 "script-src chrome-extension://mndnfokpggljbaajbnioimlmbfngpief " | |
| 415 " 'self' 'unsafe-eval'\">\n"); | |
|
Tom Sepez
2011/07/15 23:10:02
extra space? already one on previous line
| |
| 414 if (refresh > 0) { | 416 if (refresh > 0) { |
| 415 output->append("<meta http-equiv=\"refresh\" content=\""); | 417 output->append("<meta http-equiv=\"refresh\" content=\""); |
| 416 output->append(base::IntToString(refresh)); | 418 output->append(base::IntToString(refresh)); |
| 417 output->append("\"/>\n"); | 419 output->append("\"/>\n"); |
| 418 } | 420 } |
| 419 } | 421 } |
| 420 | 422 |
| 421 void AppendBody(std::string *output) { | 423 void AppendBody(std::string *output) { |
| 422 output->append("</head>\n<body>\n"); | 424 output->append("</head>\n<body>\n"); |
| 423 } | 425 } |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1520 return false; | 1522 return false; |
| 1521 } | 1523 } |
| 1522 | 1524 |
| 1523 std::vector<std::string> ChromePaths() { | 1525 std::vector<std::string> ChromePaths() { |
| 1524 std::vector<std::string> paths; | 1526 std::vector<std::string> paths; |
| 1525 paths.reserve(arraysize(kChromePaths)); | 1527 paths.reserve(arraysize(kChromePaths)); |
| 1526 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1528 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 1527 paths.push_back(kChromePaths[i]); | 1529 paths.push_back(kChromePaths[i]); |
| 1528 return paths; | 1530 return paths; |
| 1529 } | 1531 } |
| OLD | NEW |