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

Side by Side Diff: components/enhanced_bookmarks/image_store.cc

Issue 1031293002: Fix crashes due to gfx::Image unsafe thread passing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary Pass() Created 5 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/enhanced_bookmarks/image_store.h" 5 #include "components/enhanced_bookmarks/image_store.h"
6 6
7 #include "url/gurl.h" 7 #include "url/gurl.h"
8 8
9 ImageStore::ImageStore() { 9 ImageStore::ImageStore() {
10 } 10 }
11 11
12 ImageStore::~ImageStore() { 12 ImageStore::~ImageStore() {
13 } 13 }
14 14
15 void ImageStore::ChangeImageURL(const GURL& from, const GURL& to) { 15 void ImageStore::ChangeImageURL(const GURL& from, const GURL& to) {
16 DCHECK(sequence_checker_.CalledOnValidSequencedThread()); 16 DCHECK(sequence_checker_.CalledOnValidSequencedThread());
17 17
18 if (!HasKey(from)) 18 if (!HasKey(from))
19 return; 19 return;
20 20
21 const enhanced_bookmarks::ImageRecord& record = Get(from); 21 scoped_refptr<enhanced_bookmarks::ImageRecord> record = Get(from);
22 Erase(from); 22 Erase(from);
23 Insert(to, record); 23 Insert(to, record);
24 } 24 }
OLDNEW
« no previous file with comments | « components/enhanced_bookmarks/image_store.h ('k') | components/enhanced_bookmarks/image_store_ios_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698