Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/component_updater/component_updater_service.h" | 5 #include "chrome/browser/component_updater/component_updater_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 #error "unknown mac architecture" | 48 #error "unknown mac architecture" |
| 49 #endif | 49 #endif |
| 50 #elif defined(OS_WIN) | 50 #elif defined(OS_WIN) |
| 51 #if defined(_WIN64) | 51 #if defined(_WIN64) |
| 52 "os=win&arch=x64&prod=chrome&prodversion="; | 52 "os=win&arch=x64&prod=chrome&prodversion="; |
| 53 #elif defined(_WIN32) | 53 #elif defined(_WIN32) |
| 54 "os=win&arch=x86&prod=chrome&prodversion="; | 54 "os=win&arch=x86&prod=chrome&prodversion="; |
| 55 #else | 55 #else |
| 56 #error "unknown windows architecture" | 56 #error "unknown windows architecture" |
| 57 #endif | 57 #endif |
| 58 #elif defined(OS_CHROMEOS) | |
| 59 #if defined(__i386__) | |
| 60 "os=cros&arch=x86&prod=chrome&prodversion="; | |
| 61 #elif defined(__arm__) | |
| 62 "os=cros&arch=arm&prod=chrome&prodversion="; | |
| 63 #else | |
| 64 "os=cros&arch=unknown&prod=chrome&prodversion="; | |
| 65 #endif | |
| 58 #elif defined(OS_LINUX) | 66 #elif defined(OS_LINUX) |
| 59 #if defined(__amd64__) | 67 #if defined(__amd64__) |
| 60 "os=linux&arch=x64&prod=chrome&prodversion="; | 68 "os=linux&arch=x64&prod=chrome&prodversion="; |
| 61 #elif defined(__i386__) | 69 #elif defined(__i386__) |
| 62 "os=linux&arch=x86&prod=chrome&prodversion="; | 70 "os=linux&arch=x86&prod=chrome&prodversion="; |
| 71 #elif defined(__arm__) | |
| 72 "os=linux&arch=arm&prod=chrome&prodversion="; | |
| 63 #else | 73 #else |
| 64 "os=linux&arch=unknown&prod=chrome&prodversion="; | 74 "os=linux&arch=unknown&prod=chrome&prodversion="; |
| 65 #endif | 75 #endif |
| 66 #elif defined(OS_CHROMEOS) | |
| 67 #if defined(__i386__) | |
| 68 "os=cros&arch=x86&prod=chrome&prodversion="; | |
| 69 #else | |
|
cpu_(ooo_6.6-7.5)
2011/10/17 01:11:44
but I thought that chromeos also defines OS_LINUX
stevenjb
2011/10/17 17:26:11
That's correct, OS_CHROMEOS also defins OS_LINUX.
| |
| 70 // TODO(cpu): Fix this for ARM. | |
| 71 "os=cros&arch=unknown&prod=chrome&prodversion="; | |
| 72 #endif | |
| 73 #else | 76 #else |
| 74 #error "unknown os or architecture" | 77 #error "unknown os or architecture" |
| 75 #endif | 78 #endif |
| 76 | 79 |
| 77 } // namespace | 80 } // namespace |
| 78 | 81 |
| 79 class ChromeConfigurator : public ComponentUpdateService::Configurator { | 82 class ChromeConfigurator : public ComponentUpdateService::Configurator { |
| 80 public: | 83 public: |
| 81 ChromeConfigurator(const CommandLine* cmdline, | 84 ChromeConfigurator(const CommandLine* cmdline, |
| 82 net::URLRequestContextGetter* url_request_getter); | 85 net::URLRequestContextGetter* url_request_getter); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 default: | 180 default: |
| 178 NOTREACHED(); | 181 NOTREACHED(); |
| 179 break; | 182 break; |
| 180 } | 183 } |
| 181 } | 184 } |
| 182 | 185 |
| 183 ComponentUpdateService::Configurator* MakeChromeComponentUpdaterConfigurator( | 186 ComponentUpdateService::Configurator* MakeChromeComponentUpdaterConfigurator( |
| 184 const CommandLine* cmdline, net::URLRequestContextGetter* context_getter) { | 187 const CommandLine* cmdline, net::URLRequestContextGetter* context_getter) { |
| 185 return new ChromeConfigurator(cmdline, context_getter); | 188 return new ChromeConfigurator(cmdline, context_getter); |
| 186 } | 189 } |
| OLD | NEW |