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

Unified Diff: runtime/bin/resources.h

Issue 125103004: Move service into VM (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/resources_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/resources.h
diff --git a/runtime/bin/resources.h b/runtime/bin/resources.h
deleted file mode 100644
index 02cc9675a25f3f610b43f6802c2ab3e74dddbc6e..0000000000000000000000000000000000000000
--- a/runtime/bin/resources.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#ifndef BIN_RESOURCES_H_
-#define BIN_RESOURCES_H_
-
-#include <stddef.h>
-#include <string.h>
-
-// Map from Blink to Dart VM.
-#if defined(_DEBUG)
-#define DEBUG
-#endif
-
-#include "platform/assert.h"
-
-
-namespace dart {
-namespace bin {
-
-class Resources {
- public:
- static const int kNoSuchInstance = -1;
-
- static int ResourceLookup(const char* path, const char** resource) {
- for (int i = 0; i < get_resource_count(); i++) {
- resource_map_entry* entry = get_resource(i);
- if (strcmp(path, entry->path_) == 0) {
- *resource = entry->resource_;
- ASSERT(entry->length_ > 0);
- return entry->length_;
- }
- }
- return kNoSuchInstance;
- }
-
- static intptr_t get_resource_count() {
- return builtin_resources_count_;
- }
-
- static const char* get_resource_path(intptr_t i) {
- return get_resource(i)->path_;
- }
-
- private:
- struct resource_map_entry {
- const char* path_;
- const char* resource_;
- intptr_t length_;
- };
-
- // These fields are generated by resources_gen.cc.
- static resource_map_entry builtin_resources_[];
- static const intptr_t builtin_resources_count_;
-
- static resource_map_entry* get_resource(int i) {
- ASSERT(i >= 0 && i < builtin_resources_count_);
- return &builtin_resources_[i];
- }
-
- DISALLOW_ALLOCATION();
- DISALLOW_IMPLICIT_CONSTRUCTORS(Resources);
-};
-
-} // namespace bin
-} // namespace dart
-
-#endif // BIN_RESOURCES_H_
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/resources_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698