OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/offline/offline_load_page.h" | 5 #include "chrome/browser/chromeos/offline/offline_load_page.h" |
6 | 6 |
7 #include "apps/launcher.h" | 7 #include "apps/launcher.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_delegate.h" | 9 #include "ash/shell_delegate.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 if (extension && !extension->from_bookmark()) { | 91 if (extension && !extension->from_bookmark()) { |
92 LocalizedError::GetAppErrorStrings(url_, extension, &error_strings); | 92 LocalizedError::GetAppErrorStrings(url_, extension, &error_strings); |
93 resource_id = IDR_OFFLINE_APP_LOAD_HTML; | 93 resource_id = IDR_OFFLINE_APP_LOAD_HTML; |
94 } else { | 94 } else { |
95 const std::string locale = g_browser_process->GetApplicationLocale(); | 95 const std::string locale = g_browser_process->GetApplicationLocale(); |
96 const std::string accept_languages = | 96 const std::string accept_languages = |
97 profile->GetPrefs()->GetString(prefs::kAcceptLanguages); | 97 profile->GetPrefs()->GetString(prefs::kAcceptLanguages); |
98 LocalizedError::GetStrings(net::ERR_INTERNET_DISCONNECTED, | 98 LocalizedError::GetStrings(net::ERR_INTERNET_DISCONNECTED, |
99 net::kErrorDomain, url_, false, false, locale, | 99 net::kErrorDomain, url_, false, false, locale, |
100 accept_languages, &error_strings); | 100 accept_languages, |
| 101 scoped_ptr<LocalizedError::ErrorPageParams>(), |
| 102 &error_strings); |
101 resource_id = IDR_OFFLINE_NET_LOAD_HTML; | 103 resource_id = IDR_OFFLINE_NET_LOAD_HTML; |
102 } | 104 } |
103 | 105 |
104 const base::StringPiece template_html( | 106 const base::StringPiece template_html( |
105 ResourceBundle::GetSharedInstance().GetRawDataResource( | 107 ResourceBundle::GetSharedInstance().GetRawDataResource( |
106 resource_id)); | 108 resource_id)); |
107 // "t" is the id of the templates root node. | 109 // "t" is the id of the templates root node. |
108 return webui::GetTemplatesHtml(template_html, &error_strings, "t"); | 110 return webui::GetTemplatesHtml(template_html, &error_strings, "t"); |
109 } | 111 } |
110 | 112 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 const bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; | 164 const bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; |
163 DVLOG(1) << "ConnectionTypeObserver notification received: state=" | 165 DVLOG(1) << "ConnectionTypeObserver notification received: state=" |
164 << (online ? "online" : "offline"); | 166 << (online ? "online" : "offline"); |
165 if (online) { | 167 if (online) { |
166 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); | 168 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); |
167 interstitial_page_->Proceed(); | 169 interstitial_page_->Proceed(); |
168 } | 170 } |
169 } | 171 } |
170 | 172 |
171 } // namespace chromeos | 173 } // namespace chromeos |
OLD | NEW |