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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.cc

Issue 1285373004: Elim unused Chrome OS networking UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_516796_third_party_vpn_alt_2
Patch Set: Rebase Created 5 years, 4 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
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/ui/webui/options/chromeos/internet_options_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "ui/chromeos/network/network_connect.h" 47 #include "ui/chromeos/network/network_connect.h"
48 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" 48 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h"
49 49
50 namespace chromeos { 50 namespace chromeos {
51 namespace options { 51 namespace options {
52 52
53 namespace { 53 namespace {
54 54
55 // Keys for the initial "localized" dictionary values. 55 // Keys for the initial "localized" dictionary values.
56 const char kLoggedInAsOwnerKey[] = "loggedInAsOwner"; 56 const char kLoggedInAsOwnerKey[] = "loggedInAsOwner";
57 const char kShowCarrierSelectKey[] = "showCarrierSelect";
58 57
59 // Functions we call in JavaScript. 58 // Functions we call in JavaScript.
60 const char kSetVPNProvidersFunction[] = "options.VPNProviders.setProviders"; 59 const char kSetVPNProvidersFunction[] = "options.VPNProviders.setProviders";
61 60
62 // JS methods to show additional UI. 61 // JS methods to show additional UI.
63 const char kShowMorePlanInfoMessage[] = "showMorePlanInfo"; 62 const char kShowMorePlanInfoMessage[] = "showMorePlanInfo";
64 const char kSimOperationMessage[] = "simOperation"; 63 const char kSimOperationMessage[] = "simOperation";
65 64
66 // TODO(stevenjb): Deprecate these and integrate with settings Web UI. 65 // TODO(stevenjb): Deprecate these and integrate with settings Web UI.
67 const char kAddVPNConnectionMessage[] = "addVPNConnection"; 66 const char kAddVPNConnectionMessage[] = "addVPNConnection";
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 DCHECK(localized_strings); 132 DCHECK(localized_strings);
134 internet_options_strings::RegisterLocalizedStrings(localized_strings); 133 internet_options_strings::RegisterLocalizedStrings(localized_strings);
135 134
136 // TODO(stevenjb): Find a better way to populate initial data before 135 // TODO(stevenjb): Find a better way to populate initial data before
137 // InitializePage() gets called. 136 // InitializePage() gets called.
138 std::string owner; 137 std::string owner;
139 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); 138 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner);
140 bool logged_in_as_owner = LoginState::Get()->GetLoggedInUserType() == 139 bool logged_in_as_owner = LoginState::Get()->GetLoggedInUserType() ==
141 LoginState::LOGGED_IN_USER_OWNER; 140 LoginState::LOGGED_IN_USER_OWNER;
142 localized_strings->SetBoolean(kLoggedInAsOwnerKey, logged_in_as_owner); 141 localized_strings->SetBoolean(kLoggedInAsOwnerKey, logged_in_as_owner);
143 // TODO(anujsharma): Remove kShowCarrierSelectKey, as it is not
144 // required anymore.
145 localized_strings->SetBoolean(kShowCarrierSelectKey, false);
146 } 142 }
147 143
148 void InternetOptionsHandler::InitializePage() { 144 void InternetOptionsHandler::InitializePage() {
149 UpdateVPNProviders(); 145 UpdateVPNProviders();
150 } 146 }
151 147
152 void InternetOptionsHandler::RegisterMessages() { 148 void InternetOptionsHandler::RegisterMessages() {
153 web_ui()->RegisterMessageCallback(kAddVPNConnectionMessage, 149 web_ui()->RegisterMessageCallback(kAddVPNConnectionMessage,
154 base::Bind(&InternetOptionsHandler::AddVPNConnection, 150 base::Bind(&InternetOptionsHandler::AddVPNConnection,
155 base::Unretained(this))); 151 base::Unretained(this)));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 NetworkConfigView::Show(service_path, GetNativeWindow()); 335 NetworkConfigView::Show(service_path, GetNativeWindow());
340 } 336 }
341 337
342 void InternetOptionsHandler::LoadVPNProvidersCallback( 338 void InternetOptionsHandler::LoadVPNProvidersCallback(
343 const base::ListValue* args) { 339 const base::ListValue* args) {
344 UpdateVPNProviders(); 340 UpdateVPNProviders();
345 } 341 }
346 342
347 } // namespace options 343 } // namespace options
348 } // namespace chromeos 344 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/chromeos/internet_detail.js ('k') | chromeos/network/network_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698