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

Side by Side Diff: chrome/test/chromedriver/chrome_launcher.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/test/chromedriver/chrome_launcher.h" 5 #include "chrome/test/chromedriver/chrome_launcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 (*id)[i] = val + 'a'; 531 (*id)[i] = val + 'a';
532 } else { 532 } else {
533 (*id)[i] = 'a'; 533 (*id)[i] = 'a';
534 } 534 }
535 } 535 }
536 } 536 }
537 537
538 std::string GenerateExtensionId(const std::string& input) { 538 std::string GenerateExtensionId(const std::string& input) {
539 uint8 hash[16]; 539 uint8 hash[16];
540 crypto::SHA256HashString(input, hash, sizeof(hash)); 540 crypto::SHA256HashString(input, hash, sizeof(hash));
541 std::string output = StringToLowerASCII(base::HexEncode(hash, sizeof(hash))); 541 std::string output =
542 base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
542 ConvertHexadecimalToIDAlphabet(&output); 543 ConvertHexadecimalToIDAlphabet(&output);
543 return output; 544 return output;
544 } 545 }
545 546
546 Status GetExtensionBackgroundPage(const base::DictionaryValue* manifest, 547 Status GetExtensionBackgroundPage(const base::DictionaryValue* manifest,
547 const std::string& id, 548 const std::string& id,
548 std::string* bg_page) { 549 std::string* bg_page) {
549 std::string bg_page_name; 550 std::string bg_page_name;
550 bool persistent = true; 551 bool persistent = true;
551 manifest->GetBoolean("background.persistent", &persistent); 552 manifest->GetBoolean("background.persistent", &persistent);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // Write empty "First Run" file, otherwise Chrome will wipe the default 788 // Write empty "First Run" file, otherwise Chrome will wipe the default
788 // profile that was written. 789 // profile that was written.
789 if (base::WriteFile( 790 if (base::WriteFile(
790 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { 791 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) {
791 return Status(kUnknownError, "failed to write first run file"); 792 return Status(kUnknownError, "failed to write first run file");
792 } 793 }
793 return Status(kOk); 794 return Status(kOk);
794 } 795 }
795 796
796 } // namespace internal 797 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/capabilities.cc ('k') | chrome/test/chromedriver/server/http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698