| 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/ui/webui/chromeos/certificate_manager_dialog_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/certificate_manager_dialog_ui.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 content::URLDataSource::Add(profile, source); | 122 content::URLDataSource::Add(profile, source); |
| 123 } | 123 } |
| 124 | 124 |
| 125 CertificateManagerDialogUI::~CertificateManagerDialogUI() { | 125 CertificateManagerDialogUI::~CertificateManagerDialogUI() { |
| 126 // Uninitialize all registered handlers. The base class owns them and it will | 126 // Uninitialize all registered handlers. The base class owns them and it will |
| 127 // eventually delete them. | 127 // eventually delete them. |
| 128 core_handler_->Uninitialize(); | 128 core_handler_->Uninitialize(); |
| 129 cert_handler_->Uninitialize(); | 129 cert_handler_->Uninitialize(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool CertificateManagerDialogUI::AllowCaching() { |
| 133 // Should not be cached to reflect dynamically-generated contents. |
| 134 return false; |
| 135 } |
| 136 |
| 132 void CertificateManagerDialogUI::InitializeHandlers() { | 137 void CertificateManagerDialogUI::InitializeHandlers() { |
| 133 // A new web page DOM has been brought up in an existing renderer, causing | 138 // A new web page DOM has been brought up in an existing renderer, causing |
| 134 // this method to be called twice. In that case, don't initialize the handlers | 139 // this method to be called twice. In that case, don't initialize the handlers |
| 135 // again. Compare with options_ui.cc. | 140 // again. Compare with options_ui.cc. |
| 136 if (!initialized_handlers_) { | 141 if (!initialized_handlers_) { |
| 137 core_handler_->InitializeHandler(); | 142 core_handler_->InitializeHandler(); |
| 138 cert_handler_->InitializeHandler(); | 143 cert_handler_->InitializeHandler(); |
| 139 initialized_handlers_ = true; | 144 initialized_handlers_ = true; |
| 140 } | 145 } |
| 141 core_handler_->InitializePage(); | 146 core_handler_->InitializePage(); |
| 142 cert_handler_->InitializePage(); | 147 cert_handler_->InitializePage(); |
| 143 } | 148 } |
| 144 | 149 |
| 145 } // namespace chromeos | 150 } // namespace chromeos |
| OLD | NEW |