Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Side by Side Diff: chrome/browser/chromeos/offline/offline_load_page.cc

Issue 9427008: Make offline error page visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/offline_load.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/offline_load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698