| 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/ui/global_error_service.h" | 5 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/ui/global_error.h" | 11 #include "chrome/browser/ui/global_error/global_error.h" |
| 12 #include "chrome/browser/ui/global_error_bubble_view_base.h" | 12 #include "chrome/browser/ui/global_error/global_error_bubble_view_base.h" |
| 13 #include "chrome/common/chrome_notification_types.h" | 13 #include "chrome/common/chrome_notification_types.h" |
| 14 #include "content/public/browser/notification_service.h" | 14 #include "content/public/browser/notification_service.h" |
| 15 | 15 |
| 16 GlobalErrorService::GlobalErrorService(Profile* profile) : profile_(profile) { | 16 GlobalErrorService::GlobalErrorService(Profile* profile) : profile_(profile) { |
| 17 } | 17 } |
| 18 | 18 |
| 19 GlobalErrorService::~GlobalErrorService() { | 19 GlobalErrorService::~GlobalErrorService() { |
| 20 STLDeleteElements(&errors_); | 20 STLDeleteElements(&errors_); |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 else if (profile_->HasOffTheRecordProfile()) | 76 else if (profile_->HasOffTheRecordProfile()) |
| 77 profiles_to_notify.push_back(profile_->GetOffTheRecordProfile()); | 77 profiles_to_notify.push_back(profile_->GetOffTheRecordProfile()); |
| 78 for (size_t i = 0; i < profiles_to_notify.size(); ++i) { | 78 for (size_t i = 0; i < profiles_to_notify.size(); ++i) { |
| 79 content::NotificationService::current()->Notify( | 79 content::NotificationService::current()->Notify( |
| 80 chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, | 80 chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, |
| 81 content::Source<Profile>(profiles_to_notify[i]), | 81 content::Source<Profile>(profiles_to_notify[i]), |
| 82 content::Details<GlobalError>(error)); | 82 content::Details<GlobalError>(error)); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 } | 85 } |
| OLD | NEW |