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

Unified Diff: components/enhanced_bookmarks/image_record.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: nits Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: components/enhanced_bookmarks/image_record.cc
diff --git a/components/enhanced_bookmarks/image_record.cc b/components/enhanced_bookmarks/image_record.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6e4eb6941ebe9fcba970b9a8546defc248435d17
--- /dev/null
+++ b/components/enhanced_bookmarks/image_record.cc
@@ -0,0 +1,28 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/enhanced_bookmarks/image_record.h"
+
+namespace enhanced_bookmarks {
+
+ImageRecord::ImageRecord(scoped_ptr<gfx::Image> image,
+ const GURL& url,
+ SkColor dominant_color)
+ : image(image.Pass()),
+ url(url),
+ dominant_color(dominant_color) {
+}
+
+ImageRecord::ImageRecord(scoped_ptr<gfx::Image> image, const GURL& url)
+ : ImageRecord(image.Pass(), url, SK_ColorBLACK) {
+}
+
+ImageRecord::ImageRecord()
+ : ImageRecord(scoped_ptr<gfx::Image>(new gfx::Image()).Pass(), GURL()) {
+}
+
+ImageRecord::~ImageRecord() {
+}
+
+} // namespace enhanced_bookmarks

Powered by Google App Engine
This is Rietveld 408576698