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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 Release(); 628 Release();
629 } 629 }
630 630
631 bool DeveloperPrivatePackDirectoryFunction::RunImpl() { 631 bool DeveloperPrivatePackDirectoryFunction::RunImpl() {
632 int flags; 632 int flags;
633 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &item_path_str_)); 633 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &item_path_str_));
634 EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &key_path_str_)); 634 EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &key_path_str_));
635 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(2, &flags)); 635 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(2, &flags));
636 636
637 base::FilePath root_directory = 637 base::FilePath root_directory =
638 base::FilePath::FromWStringHack(UTF8ToWide(item_path_str_)); 638 base::FilePath::FromWStringHack(base::UTF8ToWide(item_path_str_));
639 639
640 base::FilePath key_file = 640 base::FilePath key_file =
641 base::FilePath::FromWStringHack(UTF8ToWide(key_path_str_)); 641 base::FilePath::FromWStringHack(base::UTF8ToWide(key_path_str_));
642 642
643 developer::PackDirectoryResponse response; 643 developer::PackDirectoryResponse response;
644 if (root_directory.empty()) { 644 if (root_directory.empty()) {
645 if (item_path_str_.empty()) 645 if (item_path_str_.empty())
646 response.message = l10n_util::GetStringUTF8( 646 response.message = l10n_util::GetStringUTF8(
647 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_REQUIRED); 647 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_REQUIRED);
648 else 648 else
649 response.message = l10n_util::GetStringUTF8( 649 response.message = l10n_util::GetStringUTF8(
650 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_INVALID); 650 IDS_EXTENSION_PACK_DIALOG_ERROR_ROOT_INVALID);
651 651
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 804
805 #undef SET_STRING 805 #undef SET_STRING
806 return true; 806 return true;
807 } 807 }
808 808
809 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {} 809 DeveloperPrivateGetStringsFunction::~DeveloperPrivateGetStringsFunction() {}
810 810
811 } // namespace api 811 } // namespace api
812 812
813 } // namespace extensions 813 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/enumerate_modules_model_win.cc ('k') | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698