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

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

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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
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 "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 30 matching lines...) Expand all
41 #include "net/base/net_errors.h" 41 #include "net/base/net_errors.h"
42 #include "ui/base/l10n/l10n_util.h" 42 #include "ui/base/l10n/l10n_util.h"
43 #include "ui/base/resource/resource_bundle.h" 43 #include "ui/base/resource/resource_bundle.h"
44 #include "ui/base/webui/jstemplate_builder.h" 44 #include "ui/base/webui/jstemplate_builder.h"
45 #include "ui/base/webui/web_ui_util.h" 45 #include "ui/base/webui/web_ui_util.h"
46 46
47 using content::BrowserThread; 47 using content::BrowserThread;
48 using content::InterstitialPage; 48 using content::InterstitialPage;
49 using content::WebContents; 49 using content::WebContents;
50 50
51 namespace {
52
53 // A utility function to set the dictionary's value given by |resource_id|.
54 void SetString(DictionaryValue* strings, const char* name, int resource_id) {
55 strings->SetString(name, l10n_util::GetStringUTF16(resource_id));
56 }
57
58 } // namespace
59
60 namespace chromeos { 51 namespace chromeos {
61 52
62 OfflineLoadPage::OfflineLoadPage(WebContents* web_contents, 53 OfflineLoadPage::OfflineLoadPage(WebContents* web_contents,
63 const GURL& url, 54 const GURL& url,
64 const CompletionCallback& callback) 55 const CompletionCallback& callback)
65 : callback_(callback), 56 : callback_(callback),
66 proceeded_(false), 57 proceeded_(false),
67 web_contents_(web_contents), 58 web_contents_(web_contents),
68 url_(url) { 59 url_(url) {
69 net::NetworkChangeNotifier::AddConnectionTypeObserver(this); 60 net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; 153 const bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE;
163 DVLOG(1) << "ConnectionTypeObserver notification received: state=" 154 DVLOG(1) << "ConnectionTypeObserver notification received: state="
164 << (online ? "online" : "offline"); 155 << (online ? "online" : "offline");
165 if (online) { 156 if (online) {
166 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); 157 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
167 interstitial_page_->Proceed(); 158 interstitial_page_->Proceed();
168 } 159 }
169 } 160 }
170 161
171 } // namespace chromeos 162 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils_browsertest.cc ('k') | chrome/browser/chromeos/options/vpn_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698