| 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 "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/string_piece.h" | 9 #include "base/string_piece.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 66 net::NetworkChangeNotifier::RemoveOnlineStateObserver(this); | 66 net::NetworkChangeNotifier::RemoveOnlineStateObserver(this); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void OfflineLoadPage::Show() { | 69 void OfflineLoadPage::Show() { |
| 70 interstitial_page_->Show(); | 70 interstitial_page_->Show(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 std::string OfflineLoadPage::GetHTMLContents() { | 73 std::string OfflineLoadPage::GetHTMLContents() { |
| 74 DictionaryValue strings; | 74 DictionaryValue strings; |
| 75 int64 time_to_wait = 0; // kMaxBlankPeriod | 75 int64 time_to_wait = kMaxBlankPeriod; |
| 76 // Set the timeout to show the page. | 76 // Set the timeout to show the page. |
| 77 strings.SetInteger("time_to_wait", static_cast<int>(time_to_wait)); | 77 strings.SetInteger("time_to_wait", static_cast<int>(time_to_wait)); |
| 78 // Button labels | 78 // Button labels |
| 79 SetString(&strings, "heading", IDS_OFFLINE_LOAD_HEADLINE); | 79 SetString(&strings, "heading", IDS_OFFLINE_LOAD_HEADLINE); |
| 80 SetString(&strings, "try_loading", IDS_OFFLINE_TRY_LOADING); | 80 SetString(&strings, "try_loading", IDS_OFFLINE_TRY_LOADING); |
| 81 SetString(&strings, "network_settings", IDS_OFFLINE_NETWORK_SETTINGS); | 81 SetString(&strings, "network_settings", IDS_OFFLINE_NETWORK_SETTINGS); |
| 82 | 82 |
| 83 // Activation | 83 // Activation |
| 84 strings.SetBoolean("show_activation", ShowActivationMessage()); | 84 strings.SetBoolean("show_activation", ShowActivationMessage()); |
| 85 | 85 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 for (size_t i = 0; i < cell_networks.size(); ++i) { | 221 for (size_t i = 0; i < cell_networks.size(); ++i) { |
| 222 chromeos::ActivationState activation_state = | 222 chromeos::ActivationState activation_state = |
| 223 cell_networks[i]->activation_state(); | 223 cell_networks[i]->activation_state(); |
| 224 if (activation_state == ACTIVATION_STATE_ACTIVATED) | 224 if (activation_state == ACTIVATION_STATE_ACTIVATED) |
| 225 return false; | 225 return false; |
| 226 } | 226 } |
| 227 return true; | 227 return true; |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace chromeos | 230 } // namespace chromeos |
| OLD | NEW |