summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_l10n_util.cc
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2011-06-28 21:49:31 +0100
committerKristian Monsen <kristianm@google.com>2011-07-08 17:55:00 +0100
commitddb351dbec246cf1fab5ec20d2d5520909041de1 (patch)
tree158e3fb57bdcac07c7f1e767fde3c70687c9fbb1 /chrome/common/extensions/extension_l10n_util.cc
parent6b92e04f5f151c896e3088e86f70db7081009308 (diff)
downloadexternal_chromium-ddb351dbec246cf1fab5ec20d2d5520909041de1.zip
external_chromium-ddb351dbec246cf1fab5ec20d2d5520909041de1.tar.gz
external_chromium-ddb351dbec246cf1fab5ec20d2d5520909041de1.tar.bz2
Merge Chromium at r12.0.742.93: Initial merge by git
Change-Id: Ic5ee2fec31358bbee305f7e915442377bfa6cda6
Diffstat (limited to 'chrome/common/extensions/extension_l10n_util.cc')
-rw-r--r--chrome/common/extensions/extension_l10n_util.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc
index 0874046..14b9178 100644
--- a/chrome/common/extensions/extension_l10n_util.cc
+++ b/chrome/common/extensions/extension_l10n_util.cc
@@ -1,24 +1,25 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/extensions/extension_l10n_util.h"
+#include <algorithm>
#include <set>
#include <string>
#include <vector>
#include "base/file_util.h"
-#include "base/linked_ptr.h"
#include "base/logging.h"
+#include "base/memory/linked_ptr.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/common/extensions/extension_message_bundle.h"
-#include "chrome/common/json_value_serializer.h"
#include "chrome/common/url_constants.h"
+#include "content/common/json_value_serializer.h"
#include "ui/base/l10n/l10n_util.h"
#include "unicode/uloc.h"
@@ -111,6 +112,20 @@ bool LocalizeManifest(const ExtensionMessageBundle& messages,
if (!LocalizeManifestValue(keys::kOmniboxKeyword, messages, manifest, error))
return false;
+ ListValue* file_handlers = NULL;
+ if (manifest->GetList(keys::kFileBrowserHandlers, &file_handlers)) {
+ key.assign(keys::kFileBrowserHandlers);
+ for (size_t i = 0; i < file_handlers->GetSize(); i++) {
+ DictionaryValue* handler = NULL;
+ if (!file_handlers->GetDictionary(i, &handler)) {
+ *error = errors::kInvalidFileBrowserHandler;
+ return false;
+ }
+ if (!LocalizeManifestValue(keys::kPageActionDefaultTitle, messages,
+ handler, error))
+ return false;
+ }
+ }
// Add current locale key to the manifest, so we can overwrite prefs
// with new manifest when chrome locale changes.
manifest->SetString(keys::kCurrentLocale, CurrentLocaleOrDefault());