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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 6695029: Make ContentBrowserClient not be owned by ContentClient, so that the latter d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 if (!profile) 1470 if (!profile)
1471 return ResultCodes::NORMAL_EXIT; 1471 return ResultCodes::NORMAL_EXIT;
1472 1472
1473 // Post-profile init --------------------------------------------------------- 1473 // Post-profile init ---------------------------------------------------------
1474 1474
1475 PrefService* user_prefs = profile->GetPrefs(); 1475 PrefService* user_prefs = profile->GetPrefs();
1476 DCHECK(user_prefs); 1476 DCHECK(user_prefs);
1477 1477
1478 // Override the default ContentBrowserClient to let Chrome participate in 1478 // Override the default ContentBrowserClient to let Chrome participate in
1479 // content logic. Must be done before any tabs are created. 1479 // content logic. Must be done before any tabs are created.
1480 content::GetContentClient()->set_browser_client( 1480 chrome::ChromeContentBrowserClient browser_client;
1481 new chrome::ChromeContentBrowserClient()); 1481 content::GetContentClient()->set_browser_client(&browser_client);
1482 1482
1483 // Tests should be able to tune login manager before showing it. 1483 // Tests should be able to tune login manager before showing it.
1484 // Thus only show login manager in normal (non-testing) mode. 1484 // Thus only show login manager in normal (non-testing) mode.
1485 if (!parameters.ui_task) { 1485 if (!parameters.ui_task) {
1486 OptionallyRunChromeOSLoginManager(parsed_command_line); 1486 OptionallyRunChromeOSLoginManager(parsed_command_line);
1487 } 1487 }
1488 1488
1489 #if !defined(OS_MACOSX) 1489 #if !defined(OS_MACOSX)
1490 // Importing other browser settings is done in a browser-like process 1490 // Importing other browser settings is done in a browser-like process
1491 // that exits when this task has finished. 1491 // that exits when this task has finished.
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 #if defined(OS_CHROMEOS) 1875 #if defined(OS_CHROMEOS)
1876 // To be precise, logout (browser shutdown) is not yet done, but the 1876 // To be precise, logout (browser shutdown) is not yet done, but the
1877 // remaining work is negligible, hence we say LogoutDone here. 1877 // remaining work is negligible, hence we say LogoutDone here.
1878 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1878 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1879 false); 1879 false);
1880 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1880 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1881 #endif 1881 #endif
1882 TRACE_EVENT_END("BrowserMain", 0, 0); 1882 TRACE_EVENT_END("BrowserMain", 0, 0);
1883 return result_code; 1883 return result_code;
1884 } 1884 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_content_client.h » ('j') | chrome/common/chrome_content_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698