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

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

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 (*id)[i] = val + 'a'; 566 (*id)[i] = val + 'a';
567 } else { 567 } else {
568 (*id)[i] = 'a'; 568 (*id)[i] = 'a';
569 } 569 }
570 } 570 }
571 } 571 }
572 572
573 std::string GenerateExtensionId(const std::string& input) { 573 std::string GenerateExtensionId(const std::string& input) {
574 uint8 hash[16]; 574 uint8 hash[16];
575 crypto::SHA256HashString(input, hash, sizeof(hash)); 575 crypto::SHA256HashString(input, hash, sizeof(hash));
576 std::string output = 576 std::string output = base::ToLowerASCII(base::HexEncode(hash, sizeof(hash)));
577 base::StringToLowerASCII(base::HexEncode(hash, sizeof(hash)));
578 ConvertHexadecimalToIDAlphabet(&output); 577 ConvertHexadecimalToIDAlphabet(&output);
579 return output; 578 return output;
580 } 579 }
581 580
582 Status GetExtensionBackgroundPage(const base::DictionaryValue* manifest, 581 Status GetExtensionBackgroundPage(const base::DictionaryValue* manifest,
583 const std::string& id, 582 const std::string& id,
584 std::string* bg_page) { 583 std::string* bg_page) {
585 std::string bg_page_name; 584 std::string bg_page_name;
586 bool persistent = true; 585 bool persistent = true;
587 manifest->GetBoolean("background.persistent", &persistent); 586 manifest->GetBoolean("background.persistent", &persistent);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // Write empty "First Run" file, otherwise Chrome will wipe the default 842 // Write empty "First Run" file, otherwise Chrome will wipe the default
844 // profile that was written. 843 // profile that was written.
845 if (base::WriteFile( 844 if (base::WriteFile(
846 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) { 845 user_data_dir.Append(chrome::kFirstRunSentinel), "", 0) != 0) {
847 return Status(kUnknownError, "failed to write first run file"); 846 return Status(kUnknownError, "failed to write first run file");
848 } 847 }
849 return Status(kOk); 848 return Status(kOk);
850 } 849 }
851 850
852 } // namespace internal 851 } // 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