OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 | 471 |
472 const base::Value* const raw_list_value = | 472 const base::Value* const raw_list_value = |
473 settings->GetPref(kLoginVideoCaptureAllowedUrls); | 473 settings->GetPref(kLoginVideoCaptureAllowedUrls); |
474 if (!raw_list_value) { | 474 if (!raw_list_value) { |
475 controller.PermissionDenied(); | 475 controller.PermissionDenied(); |
476 return; | 476 return; |
477 } | 477 } |
478 | 478 |
479 const base::ListValue* list_value; | 479 const base::ListValue* list_value; |
480 CHECK(raw_list_value->GetAsList(&list_value)); | 480 CHECK(raw_list_value->GetAsList(&list_value)); |
481 for (base::Value* base_value : *list_value) { | 481 for (const auto& base_value : *list_value) { |
482 std::string value; | 482 std::string value; |
483 if (base_value->GetAsString(&value)) { | 483 if (base_value->GetAsString(&value)) { |
484 ContentSettingsPattern pattern = | 484 ContentSettingsPattern pattern = |
485 ContentSettingsPattern::FromString(value); | 485 ContentSettingsPattern::FromString(value); |
486 if (pattern == ContentSettingsPattern::Wildcard()) { | 486 if (pattern == ContentSettingsPattern::Wildcard()) { |
487 LOG(WARNING) << "Ignoring wildcard URL pattern: " << value; | 487 LOG(WARNING) << "Ignoring wildcard URL pattern: " << value; |
488 continue; | 488 continue; |
489 } | 489 } |
490 if (pattern.IsValid() && pattern.Matches(request.security_origin)) { | 490 if (pattern.IsValid() && pattern.Matches(request.security_origin)) { |
491 controller.PermissionGranted(); | 491 controller.PermissionGranted(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 if (should_emit_login_prompt_visible_) { | 549 if (should_emit_login_prompt_visible_) { |
550 VLOG(1) << "Login WebUI >> login-prompt-visible"; | 550 VLOG(1) << "Login WebUI >> login-prompt-visible"; |
551 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 551 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
552 EmitLoginPromptVisible(); | 552 EmitLoginPromptVisible(); |
553 } | 553 } |
554 | 554 |
555 webui_visible_ = true; | 555 webui_visible_ = true; |
556 } | 556 } |
557 | 557 |
558 } // namespace chromeos | 558 } // namespace chromeos |
OLD | NEW |