| OLD | NEW |
| 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/login/eula_view.h" | 5 #include "chrome/browser/chromeos/login/eula_view.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 313 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); |
| 314 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0, | 314 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 0, |
| 315 views::GridLayout::USE_PREF, 0, 0); | 315 views::GridLayout::USE_PREF, 0, 0); |
| 316 column_set->AddPaddingColumn(0, kLastButtonHorizontalMargin + kBorderSize); | 316 column_set->AddPaddingColumn(0, kLastButtonHorizontalMargin + kBorderSize); |
| 317 } | 317 } |
| 318 | 318 |
| 319 // Convenience function. Returns URL of the OEM EULA page that should be | 319 // Convenience function. Returns URL of the OEM EULA page that should be |
| 320 // displayed using current locale and manifest. Returns empty URL otherwise. | 320 // displayed using current locale and manifest. Returns empty URL otherwise. |
| 321 static GURL GetOemEulaPagePath() { | 321 static GURL GetOemEulaPagePath() { |
| 322 const StartupCustomizationDocument* customization = | 322 const StartupCustomizationDocument* customization = |
| 323 WizardController::default_controller()->GetCustomization(); | 323 StartupCustomizationDocument::GetInstance(); |
| 324 if (customization) { | 324 if (customization->IsReady()) { |
| 325 std::string locale = customization->initial_locale(); | 325 std::string locale = customization->initial_locale(); |
| 326 std::string eula_page = customization->GetEULAPage(locale); | 326 std::string eula_page = customization->GetEULAPage(locale); |
| 327 if (!eula_page.empty()) | 327 if (!eula_page.empty()) |
| 328 return GURL(eula_page); | 328 return GURL(eula_page); |
| 329 | 329 |
| 330 VLOG(1) << "No eula found for locale: " << locale; | 330 VLOG(1) << "No eula found for locale: " << locale; |
| 331 } else { | 331 } else { |
| 332 LOG(ERROR) << "No manifest found."; | 332 LOG(ERROR) << "No manifest found."; |
| 333 } | 333 } |
| 334 return GURL(); | 334 return GURL(); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 bool EulaView::OnKeyPressed(const views::KeyEvent&) { | 559 bool EulaView::OnKeyPressed(const views::KeyEvent&) { |
| 560 // Close message bubble if shown. bubble_ will be set to NULL in callback. | 560 // Close message bubble if shown. bubble_ will be set to NULL in callback. |
| 561 if (bubble_) { | 561 if (bubble_) { |
| 562 bubble_->Close(); | 562 bubble_->Close(); |
| 563 return true; | 563 return true; |
| 564 } | 564 } |
| 565 return false; | 565 return false; |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace chromeos | 568 } // namespace chromeos |
| OLD | NEW |