| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 return false; | 140 return false; |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool HandleNonNavigationAboutURL(const GURL& url) { | 143 bool HandleNonNavigationAboutURL(const GURL& url) { |
| 144 const std::string spec(url.spec()); | 144 const std::string spec(url.spec()); |
| 145 | 145 |
| 146 if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIRestartURL)) { | 146 if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIRestartURL)) { |
| 147 // Call AttemptRestart after chrome::Navigate() completes to avoid access of | 147 // Call AttemptRestart after chrome::Navigate() completes to avoid access of |
| 148 // gtk objects after they are destroyed by BrowserWindowGtk::Close(). | 148 // gtk objects after they are destroyed by BrowserWindowGtk::Close(). |
| 149 base::ThreadTaskRunnerHandle::Get()->PostTask( | 149 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 150 FROM_HERE, base::Bind(&chrome::AttemptRestart)); | 150 FROM_HERE, base::BindOnce(&chrome::AttemptRestart)); |
| 151 return true; | 151 return true; |
| 152 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { | 152 } else if (base::LowerCaseEqualsASCII(spec, chrome::kChromeUIQuitURL)) { |
| 153 base::ThreadTaskRunnerHandle::Get()->PostTask( | 153 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 154 FROM_HERE, base::Bind(&chrome::AttemptExit)); | 154 FROM_HERE, base::BindOnce(&chrome::AttemptExit)); |
| 155 return true; | 155 return true; |
| 156 } | 156 } |
| 157 | 157 |
| 158 return false; | 158 return false; |
| 159 } | 159 } |
| OLD | NEW |