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/lifetime/application_lifetime.h" | 5 #include "chrome/browser/lifetime/application_lifetime.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 385 } |
386 | 386 |
387 #if !defined(OS_ANDROID) | 387 #if !defined(OS_ANDROID) |
388 void OnAppExiting() { | 388 void OnAppExiting() { |
389 static bool notified = false; | 389 static bool notified = false; |
390 if (notified) | 390 if (notified) |
391 return; | 391 return; |
392 notified = true; | 392 notified = true; |
393 HandleAppExitingForPlatform(); | 393 HandleAppExitingForPlatform(); |
394 } | 394 } |
| 395 |
| 396 void ResetRestartPrefs() { |
| 397 PrefService* pref_service = g_browser_process->local_state(); |
| 398 if (!pref_service) |
| 399 return; |
| 400 |
| 401 pref_service->ClearPref(prefs::kWasRestarted); |
| 402 pref_service->ClearPref(prefs::kRestartLastSessionOnShutdown); |
| 403 } |
395 #endif // !defined(OS_ANDROID) | 404 #endif // !defined(OS_ANDROID) |
396 | 405 |
397 } // namespace chrome | 406 } // namespace chrome |
OLD | NEW |