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/google/google_update.h" | 5 #include "chrome/browser/google/google_update.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlcom.h> | 8 #include <atlcom.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
16 #include "base/task.h" | 16 #include "base/task.h" |
17 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
18 #include "base/win/scoped_comptr.h" | 18 #include "base/win/scoped_comptr.h" |
19 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
20 #include "chrome/installer/util/browser_distribution.h" | 20 #include "chrome/installer/util/browser_distribution.h" |
21 #include "chrome/installer/util/google_update_settings.h" | 21 #include "chrome/installer/util/google_update_settings.h" |
22 #include "chrome/installer/util/helper.h" | 22 #include "chrome/installer/util/helper.h" |
23 #include "chrome/installer/util/install_util.h" | 23 #include "chrome/installer/util/install_util.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 #include "google_update_idl_i.c" |
25 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
26 #include "google_update_idl_i.c" | |
27 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
28 #include "views/widget/widget.h" | 28 #include "ui/views/widget/widget.h" |
29 | 29 |
30 using content::BrowserThread; | 30 using content::BrowserThread; |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // Check if the currently running instance can be updated by Google Update. | 34 // Check if the currently running instance can be updated by Google Update. |
35 // Returns GOOGLE_UPDATE_NO_ERROR only if the instance running is a Google | 35 // Returns GOOGLE_UPDATE_NO_ERROR only if the instance running is a Google |
36 // Chrome distribution installed in a standard location. | 36 // Chrome distribution installed in a standard location. |
37 GoogleUpdateErrorCode CanUpdateCurrentChrome( | 37 GoogleUpdateErrorCode CanUpdateCurrentChrome( |
38 const FilePath& chrome_exe_path) { | 38 const FilePath& chrome_exe_path) { |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 MessageLoop* main_loop) { | 384 MessageLoop* main_loop) { |
385 NOTREACHED() << "Communication with Google Update failed: " << hr | 385 NOTREACHED() << "Communication with Google Update failed: " << hr |
386 << " error: " << error_code | 386 << " error: " << error_code |
387 << ", message: " << error_message.c_str(); | 387 << ", message: " << error_message.c_str(); |
388 main_loop->PostTask( | 388 main_loop->PostTask( |
389 FROM_HERE, | 389 FROM_HERE, |
390 base::Bind(&GoogleUpdate::ReportResults, this, | 390 base::Bind(&GoogleUpdate::ReportResults, this, |
391 UPGRADE_ERROR, error_code, error_message)); | 391 UPGRADE_ERROR, error_code, error_message)); |
392 return false; | 392 return false; |
393 } | 393 } |
OLD | NEW |