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

Side by Side Diff: components/nacl/renderer/nexe_load_manager.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/nacl/renderer/nexe_load_manager.h" 5 #include "components/nacl/renderer/nexe_load_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_tokenizer.h" 10 #include "base/strings/string_tokenizer.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 uint32_t argc, const char* argn[], const char* argv[]) { 315 uint32_t argc, const char* argn[], const char* argv[]) {
316 init_time_ = base::Time::Now(); 316 init_time_ = base::Time::Now();
317 317
318 for (size_t i = 0; i < argc; ++i) { 318 for (size_t i = 0; i < argc; ++i) {
319 std::string name(argn[i]); 319 std::string name(argn[i]);
320 std::string value(argv[i]); 320 std::string value(argv[i]);
321 args_[name] = value; 321 args_[name] = value;
322 } 322 }
323 323
324 // Store mime_type_ at initialization time since we make it lowercase. 324 // Store mime_type_ at initialization time since we make it lowercase.
325 mime_type_ = StringToLowerASCII(LookupAttribute(args_, kTypeAttribute)); 325 mime_type_ = base::StringToLowerASCII(LookupAttribute(args_, kTypeAttribute));
326 } 326 }
327 327
328 void NexeLoadManager::ReportStartupOverhead() const { 328 void NexeLoadManager::ReportStartupOverhead() const {
329 base::TimeDelta overhead = base::Time::Now() - init_time_; 329 base::TimeDelta overhead = base::Time::Now() - init_time_;
330 HistogramStartupTimeMedium( 330 HistogramStartupTimeMedium(
331 "NaCl.Perf.StartupTime.NaClOverhead", overhead, nexe_size_); 331 "NaCl.Perf.StartupTime.NaClOverhead", overhead, nexe_size_);
332 } 332 }
333 333
334 bool NexeLoadManager::RequestNaClManifest(const std::string& url) { 334 bool NexeLoadManager::RequestNaClManifest(const std::string& url) {
335 if (plugin_base_url_.is_valid()) { 335 if (plugin_base_url_.is_valid()) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // to provide error handling. 417 // to provide error handling.
418 } 418 }
419 419
420 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) { 420 void NexeLoadManager::CopyCrashLogToJsConsole(const std::string& crash_log) {
421 base::StringTokenizer t(crash_log, "\n"); 421 base::StringTokenizer t(crash_log, "\n");
422 while (t.GetNext()) 422 while (t.GetNext())
423 LogToConsole(t.token()); 423 LogToConsole(t.token());
424 } 424 }
425 425
426 } // namespace nacl 426 } // namespace nacl
OLDNEW
« no previous file with comments | « components/language_usage_metrics/language_usage_metrics.cc ('k') | components/nacl/renderer/ppb_nacl_private_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698