| 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/protector/settings_change_global_error.h" | 5 #include "chrome/browser/protector/settings_change_global_error.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
| 14 #include "chrome/browser/platform_util.h" | 14 #include "chrome/browser/platform_util.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/protector/base_setting_change.h" | 16 #include "chrome/browser/protector/base_setting_change.h" |
| 17 #include "chrome/browser/protector/settings_change_global_error_delegate.h" | 17 #include "chrome/browser/protector/settings_change_global_error_delegate.h" |
| 18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/browser/ui/browser_finder.h" | 19 #include "chrome/browser/ui/browser_finder.h" |
| 20 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
| 21 #include "chrome/browser/ui/global_error_service.h" | 21 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 22 #include "chrome/browser/ui/global_error_service_factory.h" | 22 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 | 24 |
| 25 using content::BrowserThread; | 25 using content::BrowserThread; |
| 26 | 26 |
| 27 namespace protector { | 27 namespace protector { |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 | 30 |
| 31 // Timeout before the global error is removed (wrench menu item disappears). | 31 // Timeout before the global error is removed (wrench menu item disappears). |
| 32 const int kMenuItemDisplayPeriodMs = 10*60*1000; // 10 min | 32 const int kMenuItemDisplayPeriodMs = 10*60*1000; // 10 min |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 weak_factory_.InvalidateWeakPtrs(); | 227 weak_factory_.InvalidateWeakPtrs(); |
| 228 ShowBubbleView(browser); | 228 ShowBubbleView(browser); |
| 229 } | 229 } |
| 230 | 230 |
| 231 void SettingsChangeGlobalError::OnInactiveTimeout() { | 231 void SettingsChangeGlobalError::OnInactiveTimeout() { |
| 232 delegate_->OnDecisionTimeout(this); | 232 delegate_->OnDecisionTimeout(this); |
| 233 RemoveFromProfile(); | 233 RemoveFromProfile(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace protector | 236 } // namespace protector |
| OLD | NEW |