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

Side by Side Diff: extensions/renderer/static_v8_external_one_byte_string_resource.h

Issue 1543053002: Switch to standard integer types in extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-extensions-browser
Patch Set: Created 4 years, 12 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
« no previous file with comments | « extensions/renderer/set_icon_natives.cc ('k') | extensions/renderer/test_native_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef EXTENSIONS_RENDERER_STATIC_V8_EXTERNAL_ONE_BYTE_STRING_RESOURCE_H_ 5 #ifndef EXTENSIONS_RENDERER_STATIC_V8_EXTERNAL_ONE_BYTE_STRING_RESOURCE_H_
6 #define EXTENSIONS_RENDERER_STATIC_V8_EXTERNAL_ONE_BYTE_STRING_RESOURCE_H_ 6 #define EXTENSIONS_RENDERER_STATIC_V8_EXTERNAL_ONE_BYTE_STRING_RESOURCE_H_
7 7
8 #include <stddef.h>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/strings/string_piece.h" 11 #include "base/strings/string_piece.h"
10 #include "v8/include/v8.h" 12 #include "v8/include/v8.h"
11 13
12 namespace extensions { 14 namespace extensions {
13 15
14 // A very simple implementation of v8::ExternalAsciiStringResource that just 16 // A very simple implementation of v8::ExternalAsciiStringResource that just
15 // wraps a buffer. The buffer must outlive the v8 runtime instance this resource 17 // wraps a buffer. The buffer must outlive the v8 runtime instance this resource
16 // is used in. 18 // is used in.
17 class StaticV8ExternalOneByteStringResource 19 class StaticV8ExternalOneByteStringResource
18 : public v8::String::ExternalOneByteStringResource { 20 : public v8::String::ExternalOneByteStringResource {
19 public: 21 public:
20 explicit StaticV8ExternalOneByteStringResource( 22 explicit StaticV8ExternalOneByteStringResource(
21 const base::StringPiece& buffer); 23 const base::StringPiece& buffer);
22 ~StaticV8ExternalOneByteStringResource() override; 24 ~StaticV8ExternalOneByteStringResource() override;
23 25
24 const char* data() const override; 26 const char* data() const override;
25 size_t length() const override; 27 size_t length() const override;
26 28
27 private: 29 private:
28 base::StringPiece buffer_; 30 base::StringPiece buffer_;
29 }; 31 };
30 32
31 } // namespace extensions 33 } // namespace extensions
32 34
33 #endif // EXTENSIONS_RENDERER_STATIC_V8_EXTERNAL_ONE_BYTE_STRING_RESOURCE_H_ 35 #endif // EXTENSIONS_RENDERER_STATIC_V8_EXTERNAL_ONE_BYTE_STRING_RESOURCE_H_
OLDNEW
« no previous file with comments | « extensions/renderer/set_icon_natives.cc ('k') | extensions/renderer/test_native_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698