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

Unified Diff: extensions/renderer/resource_bundle_source_map.h

Issue 1880473003: Make ModuleSystem have a const view of ResourceBundleSourceMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove double lookups Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/module_system_test.cc ('k') | extensions/renderer/resource_bundle_source_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resource_bundle_source_map.h
diff --git a/extensions/renderer/resource_bundle_source_map.h b/extensions/renderer/resource_bundle_source_map.h
index 13f8f216697cc4bfc1f619cdcfdfcf67432a072d..9b7fd70737a7f1e0f7d26998a8921ce1485b908f 100644
--- a/extensions/renderer/resource_bundle_source_map.h
+++ b/extensions/renderer/resource_bundle_source_map.h
@@ -10,9 +10,7 @@
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
-#include "base/strings/string_piece.h"
#include "extensions/renderer/module_system.h"
-#include "extensions/renderer/static_v8_external_one_byte_string_resource.h"
#include "v8/include/v8.h"
namespace ui {
@@ -27,17 +25,16 @@ class ResourceBundleSourceMap : public extensions::ModuleSystem::SourceMap {
~ResourceBundleSourceMap() override;
v8::Local<v8::Value> GetSource(v8::Isolate* isolate,
- const std::string& name) override;
- bool Contains(const std::string& name) override;
+ const std::string& name) const override;
+ bool Contains(const std::string& name) const override;
void RegisterSource(const std::string& name, int resource_id);
private:
- v8::Local<v8::String> ConvertString(v8::Isolate* isolate,
- const base::StringPiece& string);
-
const ui::ResourceBundle* resource_bundle_;
std::map<std::string, int> resource_id_map_;
+
+ DISALLOW_COPY_AND_ASSIGN(ResourceBundleSourceMap);
};
} // namespace extensions
« no previous file with comments | « extensions/renderer/module_system_test.cc ('k') | extensions/renderer/resource_bundle_source_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698