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

Side by Side Diff: content/browser/browser_context.cc

Issue 1978843003: Move in-GPU mojo:media app to new thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | content/browser/mojo/browser_shell_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/public/browser/browser_context.h" 5 #include "content/public/browser/browser_context.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 shell->GetConnector()->Connect(&params), 399 shell->GetConnector()->Connect(&params),
400 std::move(shell_client_request)); 400 std::move(shell_client_request));
401 browser_context->SetUserData(kMojoShellConnection, connection_holder); 401 browser_context->SetUserData(kMojoShellConnection, connection_holder);
402 402
403 BrowserShellConnection* connection = connection_holder->shell_connection(); 403 BrowserShellConnection* connection = connection_holder->shell_connection();
404 404
405 // New embedded application factories should be added to |connection| here. 405 // New embedded application factories should be added to |connection| here.
406 406
407 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 407 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
408 switches::kMojoLocalStorage)) { 408 switches::kMojoLocalStorage)) {
409 connection->AddEmbeddedApplication( 409 MojoApplicationInfo info;
410 user_service::kUserServiceName, 410 info.application_factory = base::Bind(
411 base::Bind( 411 &user_service::CreateUserShellClient,
412 &user_service::CreateUserShellClient, 412 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
413 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 413 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB));
414 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB)), 414 connection->AddEmbeddedApplication(user_service::kUserServiceName, info);
415 nullptr);
416 } 415 }
417 } 416 }
418 } 417 }
419 418
420 // static 419 // static
421 const std::string& BrowserContext::GetMojoUserIdFor( 420 const std::string& BrowserContext::GetMojoUserIdFor(
422 BrowserContext* browser_context) { 421 BrowserContext* browser_context) {
423 CHECK(browser_context->GetUserData(kMojoWasInitialized)) 422 CHECK(browser_context->GetUserData(kMojoWasInitialized))
424 << "Attempting to get the mojo user id for a BrowserContext that was " 423 << "Attempting to get the mojo user id for a BrowserContext that was "
425 << "never Initialize()ed."; 424 << "never Initialize()ed.";
(...skipping 21 matching lines...) Expand all
447 BrowserContext::~BrowserContext() { 446 BrowserContext::~BrowserContext() {
448 CHECK(GetUserData(kMojoWasInitialized)) 447 CHECK(GetUserData(kMojoWasInitialized))
449 << "Attempting to destroy a BrowserContext that never called " 448 << "Attempting to destroy a BrowserContext that never called "
450 << "Initialize()"; 449 << "Initialize()";
451 450
452 if (GetUserData(kDownloadManagerKeyName)) 451 if (GetUserData(kDownloadManagerKeyName))
453 GetDownloadManager(this)->Shutdown(); 452 GetDownloadManager(this)->Shutdown();
454 } 453 }
455 454
456 } // namespace content 455 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/mojo/browser_shell_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698