| OLD | NEW |
| 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 // Win8 default browser registration utility. | 5 // Win8 default browser registration utility. |
| 6 // | 6 // |
| 7 // This tool can register and unregister a given exe as a potential default | 7 // This tool can register and unregister a given exe as a potential default |
| 8 // metro browser on Win8. It does not make the exe become THE default browser, | 8 // metro browser on Win8. It does not make the exe become THE default browser, |
| 9 // for a mechnism to do this please see open_with_dialog_controller.h. | 9 // for a mechnism to do this please see open_with_dialog_controller.h. |
| 10 // | 10 // |
| 11 // TODO(robertshield): By default, this creates a run-time dependency on | 11 // TODO(robertshield): By default, this creates a run-time dependency on |
| 12 // chrome.exe since it's the only thing we have right now that works as a | 12 // chrome.exe since it's the only thing we have right now that works as a |
| 13 // default viewer process. Investigate extracting the metro init code and | 13 // default viewer process. Investigate extracting the metro init code and |
| 14 // building them into a standalone viewer process. | 14 // building them into a standalone viewer process. |
| 15 | 15 |
| 16 #include <atlbase.h> | 16 #include <atlbase.h> |
| 17 #include <atlcom.h> | 17 #include <atlcom.h> |
| 18 #include <atlctl.h> | 18 #include <atlctl.h> |
| 19 #include <shellapi.h> | 19 #include <shellapi.h> |
| 20 | 20 |
| 21 #include "base/at_exit.h" | 21 #include "base/at_exit.h" |
| 22 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| 23 #include "base/files/file_path.h" | 23 #include "base/files/file_path.h" |
| 24 #include "base/memory/scoped_ptr.h" | |
| 25 #include "base/path_service.h" | 24 #include "base/path_service.h" |
| 26 #include "base/strings/stringprintf.h" | 25 #include "base/strings/stringprintf.h" |
| 27 #include "win8/test/test_registrar_constants.h" | 26 #include "win8/test/test_registrar_constants.h" |
| 28 #include "win8/test/test_registrar_resource.h" | 27 #include "win8/test/test_registrar_resource.h" |
| 29 | 28 |
| 30 namespace { | 29 namespace { |
| 31 | 30 |
| 32 const wchar_t kDelegateExecuteCLSID[] = | 31 const wchar_t kDelegateExecuteCLSID[] = |
| 33 L"{FC0064A6-D1DE-4A83-92D2-5BB4EEBB70B5}"; | 32 L"{FC0064A6-D1DE-4A83-92D2-5BB4EEBB70B5}"; |
| 34 | 33 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 base::CommandLine::Init(0, NULL); | 131 base::CommandLine::Init(0, NULL); |
| 133 InitializeCommandLineDefaultValues(); | 132 InitializeCommandLineDefaultValues(); |
| 134 | 133 |
| 135 HRESULT ret_code = _AtlModule.WinMain(nShowCmd); | 134 HRESULT ret_code = _AtlModule.WinMain(nShowCmd); |
| 136 | 135 |
| 137 return ret_code; | 136 return ret_code; |
| 138 } | 137 } |
| 139 | 138 |
| 140 OBJECT_ENTRY_AUTO(__uuidof(TestDefaultBrowserRegistrar), | 139 OBJECT_ENTRY_AUTO(__uuidof(TestDefaultBrowserRegistrar), |
| 141 TestDefaultBrowserRegistrar); | 140 TestDefaultBrowserRegistrar); |
| OLD | NEW |