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

Side by Side Diff: chrome/browser/chromeos/options/vpn_config_view.cc

Issue 8289019: Revert 105136 - [chromiumos] Start TPM token initialization re-tries on login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/options/vpn_config_view.h" 5 #include "chrome/browser/chromeos/options/vpn_config_view.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/login/user_manager.h" 10 #include "chrome/browser/chromeos/login/user_manager.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 return cert_library_->GetUserCertificates().GetPkcs11IdAt(selected); 363 return cert_library_->GetUserCertificates().GetPkcs11IdAt(selected);
364 } 364 }
365 } 365 }
366 366
367 void VPNConfigView::Init(VirtualNetwork* vpn) { 367 void VPNConfigView::Init(VirtualNetwork* vpn) {
368 views::GridLayout* layout = views::GridLayout::CreatePanel(this); 368 views::GridLayout* layout = views::GridLayout::CreatePanel(this);
369 SetLayoutManager(layout); 369 SetLayoutManager(layout);
370 370
371 // VPN may require certificates, so always set the library and observe. 371 // VPN may require certificates, so always set the library and observe.
372 cert_library_ = chromeos::CrosLibrary::Get()->GetCertLibrary(); 372 cert_library_ = chromeos::CrosLibrary::Get()->GetCertLibrary();
373 373 cert_library_->AddObserver(this);
374 // Setup a callback if certificates are yet to be loaded. 374 cert_library_->RequestCertificates();
375 if (!cert_library_->CertificatesLoaded())
376 cert_library_->AddObserver(this);
377 375
378 int column_view_set_id = 0; 376 int column_view_set_id = 0;
379 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); 377 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id);
380 // Label. 378 // Label.
381 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, 379 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1,
382 views::GridLayout::USE_PREF, 0, 0); 380 views::GridLayout::USE_PREF, 0, 0);
383 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing); 381 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing);
384 // Textfield, combobox. 382 // Textfield, combobox.
385 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 383 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
386 views::GridLayout::USE_PREF, 0, 384 views::GridLayout::USE_PREF, 0,
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 return std::string(); 707 return std::string();
710 std::string untrimmed = UTF16ToUTF8(textfield->text()); 708 std::string untrimmed = UTF16ToUTF8(textfield->text());
711 if (!trim_whitespace) 709 if (!trim_whitespace)
712 return untrimmed; 710 return untrimmed;
713 std::string result; 711 std::string result;
714 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result); 712 TrimWhitespaceASCII(untrimmed, TRIM_ALL, &result);
715 return result; 713 return result;
716 } 714 }
717 715
718 } // namespace chromeos 716 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698