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

Unified Diff: chrome/common/extensions/extension_message_bundle.h

Issue 3207002: FBTF: Forward declare and move constructors in chrome/common/extensions/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win fixes Created 10 years, 4 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: chrome/common/extensions/extension_message_bundle.h
diff --git a/chrome/common/extensions/extension_message_bundle.h b/chrome/common/extensions/extension_message_bundle.h
index 3a49021bba48f30ebdf2232e34deddd27994db59..46d59bdfa0f2899eb72bdfb2907c9881df506763 100644
--- a/chrome/common/extensions/extension_message_bundle.h
+++ b/chrome/common/extensions/extension_message_bundle.h
@@ -11,8 +11,8 @@
#include <vector>
#include "base/linked_ptr.h"
-#include "base/string_util.h"
-#include "base/values.h"
+
+class DictionaryValue;
// Contains localized extension messages for one locale. Any messages that the
// locale does not provide are pulled from the default locale.
@@ -94,24 +94,13 @@ class ExtensionMessageBundle {
// Allow only ascii 0-9, a-z, A-Z, and _ in the variable name.
// Returns false if the input is empty or if it has illegal characters.
- template<typename str>
- static bool IsValidName(const str& name) {
- if (name.empty())
- return false;
-
- typename str::const_iterator it = name.begin();
- for (; it != name.end(); ++it) {
- // Allow only ascii 0-9, a-z, A-Z, and _ in the name.
- if (!IsAsciiAlpha(*it) && !IsAsciiDigit(*it) && *it != '_' && *it != '@')
- return false;
- }
-
- return true;
- }
+ static bool IsValidName(const std::string& name);
// Getter for dictionary_.
const SubstitutionMap* dictionary() const { return &dictionary_; }
+ ~ExtensionMessageBundle();
+
private:
// Testing friend.
friend class ExtensionMessageBundleTest;

Powered by Google App Engine
This is Rietveld 408576698