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/sync/sync_global_error.h" | 5 #include "chrome/browser/sync/sync_global_error.h" |
6 | 6 |
7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/sync/profile_sync_service.h" | 8 #include "chrome/browser/sync/profile_sync_service.h" |
9 #include "chrome/browser/sync/profile_sync_service_observer.h" | 9 #include "chrome/browser/sync/profile_sync_service_observer.h" |
10 #include "chrome/browser/sync/sync_ui_util.h" | 10 #include "chrome/browser/sync/sync_ui_util.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 } | 57 } |
58 | 58 |
59 bool SyncGlobalError::HasBubbleView() { | 59 bool SyncGlobalError::HasBubbleView() { |
60 return !bubble_message_.empty() && !bubble_accept_label_.empty(); | 60 return !bubble_message_.empty() && !bubble_accept_label_.empty(); |
61 } | 61 } |
62 | 62 |
63 string16 SyncGlobalError::GetBubbleViewTitle() { | 63 string16 SyncGlobalError::GetBubbleViewTitle() { |
64 return l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE); | 64 return l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE); |
65 } | 65 } |
66 | 66 |
67 string16 SyncGlobalError::GetBubbleViewMessage() { | 67 std::vector<string16> SyncGlobalError::GetBubbleViewMessages() { |
68 return bubble_message_; | 68 return std::vector<string16>(1, bubble_message_); |
69 } | 69 } |
70 | 70 |
71 string16 SyncGlobalError::GetBubbleViewAcceptButtonLabel() { | 71 string16 SyncGlobalError::GetBubbleViewAcceptButtonLabel() { |
72 return bubble_accept_label_; | 72 return bubble_accept_label_; |
73 } | 73 } |
74 | 74 |
75 string16 SyncGlobalError::GetBubbleViewCancelButtonLabel() { | 75 string16 SyncGlobalError::GetBubbleViewCancelButtonLabel() { |
76 return string16(); | 76 return string16(); |
77 } | 77 } |
78 | 78 |
(...skipping 28 matching lines...) Expand all Loading... |
107 bubble_accept_label_ = bubble_accept_label; | 107 bubble_accept_label_ = bubble_accept_label; |
108 | 108 |
109 // Profile can be NULL during tests. | 109 // Profile can be NULL during tests. |
110 Profile* profile = service_->profile(); | 110 Profile* profile = service_->profile(); |
111 if (profile) { | 111 if (profile) { |
112 GlobalErrorServiceFactory::GetForProfile( | 112 GlobalErrorServiceFactory::GetForProfile( |
113 profile)->NotifyErrorsChanged(this); | 113 profile)->NotifyErrorsChanged(this); |
114 } | 114 } |
115 } | 115 } |
116 } | 116 } |
OLD | NEW |