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, | 100 accept_languages, &error_strings); |
101 scoped_ptr<LocalizedError::ErrorPageParams>(), | |
102 &error_strings); | |
103 resource_id = IDR_OFFLINE_NET_LOAD_HTML; | 101 resource_id = IDR_OFFLINE_NET_LOAD_HTML; |
104 } | 102 } |
105 | 103 |
106 const base::StringPiece template_html( | 104 const base::StringPiece template_html( |
107 ResourceBundle::GetSharedInstance().GetRawDataResource( | 105 ResourceBundle::GetSharedInstance().GetRawDataResource( |
108 resource_id)); | 106 resource_id)); |
109 // "t" is the id of the templates root node. | 107 // "t" is the id of the templates root node. |
110 return webui::GetTemplatesHtml(template_html, &error_strings, "t"); | 108 return webui::GetTemplatesHtml(template_html, &error_strings, "t"); |
111 } | 109 } |
112 | 110 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 const bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; | 162 const bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; |
165 DVLOG(1) << "ConnectionTypeObserver notification received: state=" | 163 DVLOG(1) << "ConnectionTypeObserver notification received: state=" |
166 << (online ? "online" : "offline"); | 164 << (online ? "online" : "offline"); |
167 if (online) { | 165 if (online) { |
168 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); | 166 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); |
169 interstitial_page_->Proceed(); | 167 interstitial_page_->Proceed(); |
170 } | 168 } |
171 } | 169 } |
172 | 170 |
173 } // namespace chromeos | 171 } // namespace chromeos |
OLD | NEW |