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

Side by Side Diff: content/shell/browser/shell_content_browser_client.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "content/public/common/content_descriptors.h" 48 #include "content/public/common/content_descriptors.h"
49 #endif 49 #endif
50 50
51 namespace content { 51 namespace content {
52 52
53 namespace { 53 namespace {
54 54
55 ShellContentBrowserClient* g_browser_client; 55 ShellContentBrowserClient* g_browser_client;
56 bool g_swap_processes_for_redirect = false; 56 bool g_swap_processes_for_redirect = false;
57 57
58 #if defined(OS_POSIX) && !defined(OS_MACOSX) 58 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
59 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( 59 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
60 const std::string& process_type) { 60 const std::string& process_type) {
61 base::FilePath dumps_path = 61 base::FilePath dumps_path =
62 CommandLine::ForCurrentProcess()->GetSwitchValuePath( 62 CommandLine::ForCurrentProcess()->GetSwitchValuePath(
63 switches::kCrashDumpsDir); 63 switches::kCrashDumpsDir);
64 { 64 {
65 ANNOTATE_SCOPED_MEMORY_LEAK; 65 ANNOTATE_SCOPED_MEMORY_LEAK;
66 breakpad::CrashHandlerHostLinux* crash_handler = 66 breakpad::CrashHandlerHostLinux* crash_handler =
67 new breakpad::CrashHandlerHostLinux( 67 new breakpad::CrashHandlerHostLinux(
68 process_type, dumps_path, false); 68 process_type, dumps_path, false);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 if (process_type == switches::kGpuProcess) { 102 if (process_type == switches::kGpuProcess) {
103 static breakpad::CrashHandlerHostLinux* crash_handler = NULL; 103 static breakpad::CrashHandlerHostLinux* crash_handler = NULL;
104 if (!crash_handler) 104 if (!crash_handler)
105 crash_handler = CreateCrashHandlerHost(process_type); 105 crash_handler = CreateCrashHandlerHost(process_type);
106 return crash_handler->GetDeathSignalSocket(); 106 return crash_handler->GetDeathSignalSocket();
107 } 107 }
108 108
109 return -1; 109 return -1;
110 } 110 }
111 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) 111 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
112 112
113 } // namespace 113 } // namespace
114 114
115 ShellContentBrowserClient* ShellContentBrowserClient::Get() { 115 ShellContentBrowserClient* ShellContentBrowserClient::Get() {
116 return g_browser_client; 116 return g_browser_client;
117 } 117 }
118 118
119 void ShellContentBrowserClient::SetSwapProcessesForRedirect(bool swap) { 119 void ShellContentBrowserClient::SetSwapProcessesForRedirect(bool swap) {
120 g_swap_processes_for_redirect = swap; 120 g_swap_processes_for_redirect = swap;
121 } 121 }
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 ShellBrowserContext* 367 ShellBrowserContext*
368 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 368 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
369 BrowserContext* content_browser_context) { 369 BrowserContext* content_browser_context) {
370 if (content_browser_context == browser_context()) 370 if (content_browser_context == browser_context())
371 return browser_context(); 371 return browser_context();
372 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 372 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
373 return off_the_record_browser_context(); 373 return off_the_record_browser_context();
374 } 374 }
375 375
376 } // namespace content 376 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/webcrypto/webcrypto_impl_unittest.cc ('k') | gpu/command_buffer/tests/gl_virtual_contexts_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698