OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 6 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
7 #include "chrome/common/url_constants.h" | 7 #include "chrome/common/url_constants.h" |
8 | 8 |
9 class RemotingResourcesSource : public ChromeURLDataManager::DataSource { | 9 class RemotingResourcesSource : public ChromeURLDataManager::DataSource { |
10 public: | 10 public: |
11 RemotingResourcesSource(); | 11 RemotingResourcesSource(); |
12 virtual void StartDataRequest(const std::string& path, | 12 virtual void StartDataRequest(const std::string& path, |
13 bool is_off_the_record, | 13 bool is_off_the_record, |
14 int request_id); | 14 int request_id); |
15 | 15 |
16 virtual std::string GetMimeType(const std::string& path) const { | 16 virtual std::string GetMimeType(const std::string& path) const; |
17 return "text/html"; | |
18 } | |
19 | 17 |
20 static const char kInvalidPasswordHelpUrl[]; | 18 static const char kInvalidPasswordHelpUrl[]; |
21 static const char kCanNotAccessAccountUrl[]; | 19 static const char kCanNotAccessAccountUrl[]; |
22 static const char kCreateNewAccountUrl[]; | 20 static const char kCreateNewAccountUrl[]; |
23 | 21 |
24 private: | 22 private: |
25 virtual ~RemotingResourcesSource() {} | 23 virtual ~RemotingResourcesSource() {} |
26 | 24 |
27 // Takes a string containing an URL and returns an URL containing a CGI | 25 // Takes a string containing an URL and returns an URL containing a CGI |
28 // parameter of the form "&hl=xy" where 'xy' is the language code of the | 26 // parameter of the form "&hl=xy" where 'xy' is the language code of the |
29 // current locale. | 27 // current locale. |
30 std::string GetLocalizedUrl(const std::string& url) const; | 28 std::string GetLocalizedUrl(const std::string& url) const; |
31 | 29 |
32 DISALLOW_COPY_AND_ASSIGN(RemotingResourcesSource); | 30 DISALLOW_COPY_AND_ASSIGN(RemotingResourcesSource); |
33 }; | 31 }; |
OLD | NEW |