OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 // Convenience function. Returns URL of the OEM EULA page that should be | 285 // Convenience function. Returns URL of the OEM EULA page that should be |
286 // displayed using current locale and manifest. Returns empty URL otherwise. | 286 // displayed using current locale and manifest. Returns empty URL otherwise. |
287 static GURL GetOemEulaPagePath() { | 287 static GURL GetOemEulaPagePath() { |
288 const StartupCustomizationDocument *customization = | 288 const StartupCustomizationDocument *customization = |
289 WizardController::default_controller()->GetCustomization(); | 289 WizardController::default_controller()->GetCustomization(); |
290 if (customization) { | 290 if (customization) { |
291 std::string locale = g_browser_process->GetApplicationLocale(); | 291 std::string locale = g_browser_process->GetApplicationLocale(); |
292 FilePath eula_page_path = customization->GetEULAPagePath(locale); | 292 FilePath eula_page_path = customization->GetEULAPagePath(locale); |
293 if (eula_page_path.empty()) { | 293 if (eula_page_path.empty()) { |
294 LOG(INFO) << "No eula found for locale: " << locale; | 294 VLOG(1) << "No eula found for locale: " << locale; |
295 locale = customization->initial_locale(); | 295 locale = customization->initial_locale(); |
296 eula_page_path = customization->GetEULAPagePath(locale); | 296 eula_page_path = customization->GetEULAPagePath(locale); |
297 } | 297 } |
298 if (!eula_page_path.empty()) { | 298 if (!eula_page_path.empty()) { |
299 const std::string page_path = std::string(chrome::kFileScheme) + | 299 const std::string page_path = std::string(chrome::kFileScheme) + |
300 chrome::kStandardSchemeSeparator + eula_page_path.value(); | 300 chrome::kStandardSchemeSeparator + eula_page_path.value(); |
301 return GURL(page_path); | 301 return GURL(page_path); |
302 } else { | 302 } else { |
303 LOG(INFO) << "No eula found for locale: " << locale; | 303 VLOG(1) << "No eula found for locale: " << locale; |
304 } | 304 } |
305 } else { | 305 } else { |
306 LOG(ERROR) << "No manifest found."; | 306 LOG(ERROR) << "No manifest found."; |
307 } | 307 } |
308 return GURL(); | 308 return GURL(); |
309 } | 309 } |
310 | 310 |
311 void EulaView::Init() { | 311 void EulaView::Init() { |
312 // First, command to own the TPM. | 312 // First, command to own the TPM. |
313 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { | 313 if (chromeos::CrosLibrary::Get()->EnsureLoaded()) { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 bool EulaView::OnKeyPressed(const views::KeyEvent&) { | 531 bool EulaView::OnKeyPressed(const views::KeyEvent&) { |
532 // Close message bubble if shown. bubble_ will be set to NULL in callback. | 532 // Close message bubble if shown. bubble_ will be set to NULL in callback. |
533 if (bubble_) { | 533 if (bubble_) { |
534 bubble_->Close(); | 534 bubble_->Close(); |
535 return true; | 535 return true; |
536 } | 536 } |
537 return false; | 537 return false; |
538 } | 538 } |
539 | 539 |
540 } // namespace chromeos | 540 } // namespace chromeos |
OLD | NEW |