| 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 // #include <algorithm> | 4 // #include <algorithm> | 
| 5 | 5 | 
| 6 #include <algorithm> | 6 #include <algorithm> | 
| 7 | 7 | 
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" | 
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" | 
| 10 #include "base/values.h" | 10 #include "base/values.h" | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 66 // HTMLOperationsInterface | 66 // HTMLOperationsInterface | 
| 67 // | 67 // | 
| 68 //////////////////////////////////////////////////////////////////////////////// | 68 //////////////////////////////////////////////////////////////////////////////// | 
| 69 base::StringPiece HTMLOperationsInterface::GetLoginHTML() { | 69 base::StringPiece HTMLOperationsInterface::GetLoginHTML() { | 
| 70   base::StringPiece login_html( | 70   base::StringPiece login_html( | 
| 71       ResourceBundle::GetSharedInstance().GetRawDataResource( | 71       ResourceBundle::GetSharedInstance().GetRawDataResource( | 
| 72           IDR_LOGIN_HTML)); | 72           IDR_LOGIN_HTML)); | 
| 73   return login_html; | 73   return login_html; | 
| 74 } | 74 } | 
| 75 | 75 | 
|  | 76 base::StringPiece HTMLOperationsInterface::GetLoginContainerHTML() { | 
|  | 77   base::StringPiece login_html( | 
|  | 78       ResourceBundle::GetSharedInstance().GetRawDataResource( | 
|  | 79           IDR_LOGIN_CONTAINER_HTML)); | 
|  | 80   return login_html; | 
|  | 81 } | 
|  | 82 | 
| 76 std::string HTMLOperationsInterface::GetFullHTML( | 83 std::string HTMLOperationsInterface::GetFullHTML( | 
| 77     base::StringPiece login_html, | 84     base::StringPiece login_html, | 
| 78     DictionaryValue* localized_strings) { | 85     DictionaryValue* localized_strings) { | 
| 79   return jstemplate_builder::GetI18nTemplateHtml( | 86   return jstemplate_builder::GetI18nTemplateHtml( | 
| 80       login_html, | 87       login_html, | 
| 81       localized_strings); | 88       localized_strings); | 
| 82 } | 89 } | 
| 83 | 90 | 
| 84 RefCountedBytes* HTMLOperationsInterface::CreateHTMLBytes( | 91 RefCountedBytes* HTMLOperationsInterface::CreateHTMLBytes( | 
| 85     std::string full_html) { | 92     std::string full_html) { | 
| 86   RefCountedBytes* html_bytes = new RefCountedBytes(); | 93   RefCountedBytes* html_bytes = new RefCountedBytes(); | 
| 87   html_bytes->data.resize(full_html.size()); | 94   html_bytes->data.resize(full_html.size()); | 
| 88   std::copy(full_html.begin(), | 95   std::copy(full_html.begin(), | 
| 89             full_html.end(), | 96             full_html.end(), | 
| 90             html_bytes->data.begin()); | 97             html_bytes->data.begin()); | 
| 91   return html_bytes; | 98   return html_bytes; | 
| 92 } | 99 } | 
| 93 | 100 | 
| 94 }  // namespace chromeos | 101 }  // namespace chromeos | 
| OLD | NEW | 
|---|