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

Side by Side Diff: tools/set_default_handler/set_default_handler_main.cc

Issue 189603007: Let DCHECK in non-official-release build be opt-in with dcheck_always_on=1 only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 6 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
« no previous file with comments | « tools/android/forwarder2/daemon.cc ('k') | no next file » | 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) 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 // Makes a given program ("Google Chrome" by default) the default handler for 5 // Makes a given program ("Google Chrome" by default) the default handler for
6 // some URL protocol ("http" by default) on Windows 8. These defaults can be 6 // some URL protocol ("http" by default) on Windows 8. These defaults can be
7 // overridden via the --program and --protocol command line switches. 7 // overridden via the --program and --protocol command line switches.
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 15 matching lines...) Expand all
26 } // namespace 26 } // namespace
27 27
28 extern "C" 28 extern "C"
29 int wmain(int argc, wchar_t* argv[]) { 29 int wmain(int argc, wchar_t* argv[]) {
30 // Initialize the commandline singleton from the environment. 30 // Initialize the commandline singleton from the environment.
31 CommandLine::Init(0, NULL); 31 CommandLine::Init(0, NULL);
32 // The exit manager is in charge of calling the dtors of singletons. 32 // The exit manager is in charge of calling the dtors of singletons.
33 base::AtExitManager exit_manager; 33 base::AtExitManager exit_manager;
34 logging::LoggingSettings settings; 34 logging::LoggingSettings settings;
35 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; 35 settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
36 settings.dcheck_state =
37 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
38 logging::InitLogging(settings); 36 logging::InitLogging(settings);
39 logging::SetMinLogLevel(logging::LOG_VERBOSE); 37 logging::SetMinLogLevel(logging::LOG_VERBOSE);
40 38
41 ui::win::CreateATLModuleIfNeeded(); 39 ui::win::CreateATLModuleIfNeeded();
42 40
43 CommandLine* command_line = CommandLine::ForCurrentProcess(); 41 CommandLine* command_line = CommandLine::ForCurrentProcess();
44 base::string16 protocol(command_line->GetSwitchValueNative(kSwitchProtocol)); 42 base::string16 protocol(command_line->GetSwitchValueNative(kSwitchProtocol));
45 if (protocol.empty()) 43 if (protocol.empty())
46 protocol = kDefaultProtocol; 44 protocol = kDefaultProtocol;
47 45
(...skipping 10 matching lines...) Expand all
58 printf("success\n"); 56 printf("success\n");
59 } else if (!choices.empty()) { 57 } else if (!choices.empty()) {
60 printf("failed to set program. possible choices: %ls\n", 58 printf("failed to set program. possible choices: %ls\n",
61 JoinString(choices, L", ").c_str()); 59 JoinString(choices, L", ").c_str());
62 } else { 60 } else {
63 printf("failed with HRESULT: %0x08X\n", result); 61 printf("failed with HRESULT: %0x08X\n", result);
64 } 62 }
65 63
66 return FAILED(result); 64 return FAILED(result);
67 } 65 }
OLDNEW
« no previous file with comments | « tools/android/forwarder2/daemon.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698