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

Side by Side Diff: chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc

Issue 624173002: replace OVERRIDE and FINAL with override and final in chrome/browser/[j-q]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/media_galleries/fileapi/supported_image_type_validator. h" 5 #include "chrome/browser/media_galleries/fileapi/supported_image_type_validator. h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 : data_(data.Pass()), callback_(callback) { 55 : data_(data.Pass()), callback_(callback) {
56 DCHECK(data_); 56 DCHECK(data_);
57 } 57 }
58 58
59 const std::string& data() { 59 const std::string& data() {
60 return *data_; 60 return *data_;
61 } 61 }
62 62
63 // ImageDecoder::Delegate methods. 63 // ImageDecoder::Delegate methods.
64 virtual void OnImageDecoded(const ImageDecoder* /*decoder*/, 64 virtual void OnImageDecoded(const ImageDecoder* /*decoder*/,
65 const SkBitmap& /*decoded_image*/) OVERRIDE { 65 const SkBitmap& /*decoded_image*/) override {
66 callback_.Run(base::File::FILE_OK); 66 callback_.Run(base::File::FILE_OK);
67 delete this; 67 delete this;
68 } 68 }
69 69
70 virtual void OnDecodeImageFailed(const ImageDecoder* /*decoder*/) OVERRIDE { 70 virtual void OnDecodeImageFailed(const ImageDecoder* /*decoder*/) override {
71 callback_.Run(base::File::FILE_ERROR_SECURITY); 71 callback_.Run(base::File::FILE_ERROR_SECURITY);
72 delete this; 72 delete this;
73 } 73 }
74 74
75 private: 75 private:
76 scoped_ptr<std::string> data_; 76 scoped_ptr<std::string> data_;
77 storage::CopyOrMoveFileValidator::ResultCallback callback_; 77 storage::CopyOrMoveFileValidator::ResultCallback callback_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(ImageDecoderDelegateAdapter); 79 DISALLOW_COPY_AND_ASSIGN(ImageDecoderDelegateAdapter);
80 }; 80 };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 126
127 // |adapter| will delete itself after a completion message is received. 127 // |adapter| will delete itself after a completion message is received.
128 ImageDecoderDelegateAdapter* adapter = 128 ImageDecoderDelegateAdapter* adapter =
129 new ImageDecoderDelegateAdapter(data.Pass(), callback_); 129 new ImageDecoderDelegateAdapter(data.Pass(), callback_);
130 decoder_ = new ImageDecoder(adapter, adapter->data(), 130 decoder_ = new ImageDecoder(adapter, adapter->data(),
131 ImageDecoder::DEFAULT_CODEC); 131 ImageDecoder::DEFAULT_CODEC);
132 decoder_->Start(content::BrowserThread::GetMessageLoopProxyForThread( 132 decoder_->Start(content::BrowserThread::GetMessageLoopProxyForThread(
133 BrowserThread::IO)); 133 BrowserThread::IO));
134 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698