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

Side by Side Diff: extensions/browser/api/cast_channel/logger.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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 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 "extensions/browser/api/cast_channel/logger.h" 5 #include "extensions/browser/api/cast_channel/logger.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/time/tick_clock.h" 10 #include "base/time/tick_clock.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 LogSocketEvent(channel_id, event); 244 LogSocketEvent(channel_id, event);
245 } 245 }
246 246
247 void Logger::LogSocketEventForMessage(int channel_id, 247 void Logger::LogSocketEventForMessage(int channel_id,
248 EventType event_type, 248 EventType event_type,
249 const std::string& message_namespace, 249 const std::string& message_namespace,
250 const std::string& details) { 250 const std::string& details) {
251 DCHECK(thread_checker_.CalledOnValidThread()); 251 DCHECK(thread_checker_.CalledOnValidThread());
252 252
253 SocketEvent event = CreateEvent(event_type); 253 SocketEvent event = CreateEvent(event_type);
254 if (base::StartsWithASCII(message_namespace, kInternalNamespacePrefix, false)) 254 if (base::StartsWith(message_namespace, kInternalNamespacePrefix,
255 base::CompareCase::INSENSITIVE_ASCII))
255 event.set_message_namespace(message_namespace); 256 event.set_message_namespace(message_namespace);
256 event.set_details(details); 257 event.set_details(details);
257 258
258 LogSocketEvent(channel_id, event); 259 LogSocketEvent(channel_id, event);
259 } 260 }
260 261
261 void Logger::LogSocketChallengeReplyEvent(int channel_id, 262 void Logger::LogSocketChallengeReplyEvent(int channel_id,
262 const AuthResult& auth_result) { 263 const AuthResult& auth_result) {
263 DCHECK(thread_checker_.CalledOnValidThread()); 264 DCHECK(thread_checker_.CalledOnValidThread());
264 265
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (it != aggregated_socket_events_.end()) { 364 if (it != aggregated_socket_events_.end()) {
364 return it->second->last_errors; 365 return it->second->last_errors;
365 } else { 366 } else {
366 return LastErrors(); 367 return LastErrors();
367 } 368 }
368 } 369 }
369 370
370 } // namespace cast_channel 371 } // namespace cast_channel
371 } // namespace core_api 372 } // namespace core_api
372 } // namespace extensions 373 } // namespace extensions
OLDNEW
« no previous file with comments | « content/renderer/savable_resources.cc ('k') | extensions/browser/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698