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

Side by Side Diff: chrome/browser/extensions/extension_file_util.cc

Issue 293037: Implementing better fallback algorithm.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_l10n_util.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/extensions/extension_file_util.h" 5 #include "chrome/browser/extensions/extension_file_util.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 // We can't call g_browser_process->GetApplicationLocale() since we are not 356 // We can't call g_browser_process->GetApplicationLocale() since we are not
357 // on the main thread. 357 // on the main thread.
358 static std::string app_locale = l10n_util::GetApplicationLocale(L""); 358 static std::string app_locale = l10n_util::GetApplicationLocale(L"");
359 if (locales.find(app_locale) == locales.end()) 359 if (locales.find(app_locale) == locales.end())
360 app_locale = ""; 360 app_locale = "";
361 ExtensionMessageBundle* message_bundle = 361 ExtensionMessageBundle* message_bundle =
362 extension_l10n_util::LoadMessageCatalogs(locale_path, 362 extension_l10n_util::LoadMessageCatalogs(locale_path,
363 default_locale, 363 default_locale,
364 app_locale, 364 app_locale,
365 locales,
365 error); 366 error);
366 return message_bundle; 367 return message_bundle;
367 } 368 }
368 369
369 bool CheckForIllegalFilenames(const FilePath& extension_path, 370 bool CheckForIllegalFilenames(const FilePath& extension_path,
370 std::string* error) { 371 std::string* error) {
371 // Reserved underscore names. 372 // Reserved underscore names.
372 static const char* reserved_names[] = { 373 static const char* reserved_names[] = {
373 Extension::kLocaleFolder 374 Extension::kLocaleFolder
374 }; 375 };
(...skipping 23 matching lines...) Expand all
398 "Filenames starting with \"_\" are reserved for use by the system.", 399 "Filenames starting with \"_\" are reserved for use by the system.",
399 filename.c_str()); 400 filename.c_str());
400 return false; 401 return false;
401 } 402 }
402 } 403 }
403 404
404 return true; 405 return true;
405 } 406 }
406 407
407 } // namespace extension_file_util 408 } // namespace extension_file_util
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698