Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: chrome/browser/notifications/sync_notifier/synced_notification.cc

Issue 263563003: Add referrer & load flag support to BitmapFetcher class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use new start function only Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698