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

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 67923002: Fixes for -Wunused-function on Linux, Android and ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for realz Created 7 years, 1 month 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
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | chrome/browser/apps/app_browsertest.cc » ('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 "chrome/app/chrome_main_delegate.h" 5 #include "chrome/app/chrome_main_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 void HandleHelpSwitches(const CommandLine& command_line) { 281 void HandleHelpSwitches(const CommandLine& command_line) {
282 if (command_line.HasSwitch(switches::kHelp) || 282 if (command_line.HasSwitch(switches::kHelp) ||
283 command_line.HasSwitch(switches::kHelpShort)) { 283 command_line.HasSwitch(switches::kHelpShort)) {
284 base::FilePath binary(command_line.argv()[0]); 284 base::FilePath binary(command_line.argv()[0]);
285 execlp("man", "man", binary.BaseName().value().c_str(), NULL); 285 execlp("man", "man", binary.BaseName().value().c_str(), NULL);
286 PLOG(FATAL) << "execlp failed"; 286 PLOG(FATAL) << "execlp failed";
287 } 287 }
288 } 288 }
289 #endif 289 #endif
290 290
291 #if !defined(OS_MACOSX) 291 #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
292 void SIGTERMProfilingShutdown(int signal) { 292 void SIGTERMProfilingShutdown(int signal) {
293 Profiling::Stop(); 293 Profiling::Stop();
294 struct sigaction sigact; 294 struct sigaction sigact;
295 memset(&sigact, 0, sizeof(sigact)); 295 memset(&sigact, 0, sizeof(sigact));
296 sigact.sa_handler = SIG_DFL; 296 sigact.sa_handler = SIG_DFL;
297 CHECK(sigaction(SIGTERM, &sigact, NULL) == 0); 297 CHECK(sigaction(SIGTERM, &sigact, NULL) == 0);
298 raise(signal); 298 raise(signal);
299 } 299 }
300 300
301 void SetUpProfilingShutdownHandler() { 301 void SetUpProfilingShutdownHandler() {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 #endif 807 #endif
808 } 808 }
809 809
810 void ChromeMainDelegate::ZygoteForked() { 810 void ChromeMainDelegate::ZygoteForked() {
811 Profiling::ProcessStarted(); 811 Profiling::ProcessStarted();
812 if (Profiling::BeingProfiled()) { 812 if (Profiling::BeingProfiled()) {
813 base::debug::RestartProfilingAfterFork(); 813 base::debug::RestartProfilingAfterFork();
814 SetUpProfilingShutdownHandler(); 814 SetUpProfilingShutdownHandler();
815 } 815 }
816 816
817 #if defined(OS_POSIX) && !defined(OS_MACOSX)
818 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets 817 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
819 // this up for the browser process in a different manner. 818 // this up for the browser process in a different manner.
820 breakpad::InitCrashReporter(); 819 breakpad::InitCrashReporter();
821 820
822 // Reset the command line for the newly spawned process. 821 // Reset the command line for the newly spawned process.
823 crash_keys::SetSwitchesFromCommandLine(CommandLine::ForCurrentProcess()); 822 crash_keys::SetSwitchesFromCommandLine(CommandLine::ForCurrentProcess());
824 #endif
825 } 823 }
826 824
827 #endif // OS_MACOSX 825 #endif // OS_MACOSX
828 826
829 content::ContentBrowserClient* 827 content::ContentBrowserClient*
830 ChromeMainDelegate::CreateContentBrowserClient() { 828 ChromeMainDelegate::CreateContentBrowserClient() {
831 #if defined(CHROME_MULTIPLE_DLL_CHILD) 829 #if defined(CHROME_MULTIPLE_DLL_CHILD)
832 return NULL; 830 return NULL;
833 #else 831 #else
834 return &g_chrome_content_browser_client.Get(); 832 return &g_chrome_content_browser_client.Get();
(...skipping 18 matching lines...) Expand all
853 } 851 }
854 852
855 content::ContentUtilityClient* 853 content::ContentUtilityClient*
856 ChromeMainDelegate::CreateContentUtilityClient() { 854 ChromeMainDelegate::CreateContentUtilityClient() {
857 #if defined(CHROME_MULTIPLE_DLL_BROWSER) 855 #if defined(CHROME_MULTIPLE_DLL_BROWSER)
858 return NULL; 856 return NULL;
859 #else 857 #else
860 return &g_chrome_content_utility_client.Get(); 858 return &g_chrome_content_utility_client.Get();
861 #endif 859 #endif
862 } 860 }
OLDNEW
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | chrome/browser/apps/app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698