| 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/notifications/sync_notifier/synced_notification.h" | 5 #include "chrome/browser/notifications/sync_notifier/synced_notification.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 // See if all bitmaps are accounted for, if so call Show(). | 276 // See if all bitmaps are accounted for, if so call Show(). |
| 277 if (AreAllBitmapsFetched()) { | 277 if (AreAllBitmapsFetched()) { |
| 278 Show(profile_); | 278 Show(profile_); |
| 279 } | 279 } |
| 280 } | 280 } |
| 281 | 281 |
| 282 void SyncedNotification::StartBitmapFetch() { | 282 void SyncedNotification::StartBitmapFetch() { |
| 283 // Now that we have queued and counted them all, start the fetching. | 283 // Now that we have queued and counted them all, start the fetching. |
| 284 ScopedVector<chrome::BitmapFetcher>::iterator iter; | 284 ScopedVector<chrome::BitmapFetcher>::iterator iter; |
| 285 for (iter = fetchers_.begin(); iter != fetchers_.end(); ++iter) { | 285 for (iter = fetchers_.begin(); iter != fetchers_.end(); ++iter) { |
| 286 (*iter)->Start(profile_->GetRequestContext()); | 286 (*iter)->Start( |
| 287 profile_->GetRequestContext(), |
| 288 "", |
| 289 net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, |
| 290 net::LOAD_NORMAL); |
| 287 } | 291 } |
| 288 } | 292 } |
| 289 | 293 |
| 290 // This should detect even small changes in case the server updated the | 294 // This should detect even small changes in case the server updated the |
| 291 // notification. We ignore the timestamp if other fields match. | 295 // notification. We ignore the timestamp if other fields match. |
| 292 bool SyncedNotification::EqualsIgnoringReadState( | 296 bool SyncedNotification::EqualsIgnoringReadState( |
| 293 const SyncedNotification& other) const { | 297 const SyncedNotification& other) const { |
| 294 if (GetTitle() == other.GetTitle() && | 298 if (GetTitle() == other.GetTitle() && |
| 295 GetHeading() == other.GetHeading() && | 299 GetHeading() == other.GetHeading() && |
| 296 GetDescription() == other.GetDescription() && | 300 GetDescription() == other.GetDescription() && |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 specifics_.mutable_coalesced_notification()->set_read_state( | 736 specifics_.mutable_coalesced_notification()->set_read_state( |
| 733 sync_pb::CoalescedSyncedNotification_ReadState_UNREAD); | 737 sync_pb::CoalescedSyncedNotification_ReadState_UNREAD); |
| 734 else if (kRead == read_state) | 738 else if (kRead == read_state) |
| 735 specifics_.mutable_coalesced_notification()->set_read_state( | 739 specifics_.mutable_coalesced_notification()->set_read_state( |
| 736 sync_pb::CoalescedSyncedNotification_ReadState_READ); | 740 sync_pb::CoalescedSyncedNotification_ReadState_READ); |
| 737 else | 741 else |
| 738 NOTREACHED(); | 742 NOTREACHED(); |
| 739 } | 743 } |
| 740 | 744 |
| 741 } // namespace notifier | 745 } // namespace notifier |
| OLD | NEW |