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/dom_ui/sync_internals_html_source.h" | 5 #include "chrome/browser/dom_ui/sync_internals_html_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/resource_bundle.h" | |
10 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
11 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
12 #include "base/ref_counted_memory.h" | 11 #include "base/ref_counted_memory.h" |
13 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
14 #include "base/values.h" | 13 #include "base/values.h" |
15 #include "chrome/common/jstemplate_builder.h" | 14 #include "chrome/common/jstemplate_builder.h" |
16 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
17 #include "grit/sync_internals_resources.h" | 16 #include "grit/sync_internals_resources.h" |
| 17 #include "ui/base/resource/resource_bundle.h" |
18 | 18 |
19 SyncInternalsHTMLSource::SyncInternalsHTMLSource() | 19 SyncInternalsHTMLSource::SyncInternalsHTMLSource() |
20 : DataSource(chrome::kChromeUISyncInternalsHost, | 20 : DataSource(chrome::kChromeUISyncInternalsHost, |
21 MessageLoop::current()) {} | 21 MessageLoop::current()) {} |
22 | 22 |
23 SyncInternalsHTMLSource::~SyncInternalsHTMLSource() {} | 23 SyncInternalsHTMLSource::~SyncInternalsHTMLSource() {} |
24 | 24 |
25 void SyncInternalsHTMLSource::StartDataRequest(const std::string& path, | 25 void SyncInternalsHTMLSource::StartDataRequest(const std::string& path, |
26 bool is_off_the_record, | 26 bool is_off_the_record, |
27 int request_id) { | 27 int request_id) { |
(...skipping 12 matching lines...) Expand all Loading... |
40 scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes()); | 40 scoped_refptr<RefCountedBytes> bytes(new RefCountedBytes()); |
41 bytes->data.resize(html.size()); | 41 bytes->data.resize(html.size()); |
42 std::copy(html.begin(), html.end(), bytes->data.begin()); | 42 std::copy(html.begin(), html.end(), bytes->data.begin()); |
43 SendResponse(request_id, bytes); | 43 SendResponse(request_id, bytes); |
44 } | 44 } |
45 | 45 |
46 std::string SyncInternalsHTMLSource::GetMimeType( | 46 std::string SyncInternalsHTMLSource::GetMimeType( |
47 const std::string& path) const { | 47 const std::string& path) const { |
48 return "text/html"; | 48 return "text/html"; |
49 } | 49 } |
OLD | NEW |