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

Side by Side Diff: content/browser/streams/stream_context.cc

Issue 1875913002: Cleanup: Convert const char* kFoo to const char kFoo[]. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 "content/browser/streams/stream_context.h" 5 #include "content/browser/streams/stream_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/browser/streams/stream_registry.h" 8 #include "content/browser/streams/stream_registry.h"
9 #include "content/public/browser/browser_context.h" 9 #include "content/public/browser/browser_context.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 11
12 using base::UserDataAdapter; 12 using base::UserDataAdapter;
13 13
14 namespace { 14 namespace {
15 const char* kStreamContextKeyName = "content_stream_context"; 15
16 } 16 const char kStreamContextKeyName[] = "content_stream_context";
17
18 } // namespace
17 19
18 namespace content { 20 namespace content {
19 21
20 StreamContext::StreamContext() {} 22 StreamContext::StreamContext() {}
21 23
22 StreamContext* StreamContext::GetFor(BrowserContext* context) { 24 StreamContext* StreamContext::GetFor(BrowserContext* context) {
23 if (!context->GetUserData(kStreamContextKeyName)) { 25 if (!context->GetUserData(kStreamContextKeyName)) {
24 scoped_refptr<StreamContext> stream = new StreamContext(); 26 scoped_refptr<StreamContext> stream = new StreamContext();
25 context->SetUserData(kStreamContextKeyName, 27 context->SetUserData(kStreamContextKeyName,
26 new UserDataAdapter<StreamContext>(stream.get())); 28 new UserDataAdapter<StreamContext>(stream.get()));
(...skipping 22 matching lines...) Expand all
49 // tests. 51 // tests.
50 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) && 52 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) &&
51 !BrowserThread::CurrentlyOn(BrowserThread::IO)) { 53 !BrowserThread::CurrentlyOn(BrowserThread::IO)) {
52 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); 54 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
53 return; 55 return;
54 } 56 }
55 delete this; 57 delete this;
56 } 58 }
57 59
58 } // namespace content 60 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/google_one_shot_remote_engine.cc ('k') | content/browser/time_zone_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698