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

Side by Side Diff: chrome/browser/component_updater/pepper_flash_component_installer.cc

Issue 2493973003: Display "Restart to update" dialog to Chrome OS users. (Closed)
Patch Set: Rebased CL Created 4 years 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
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 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" 5 #include "chrome/browser/component_updater/pepper_flash_component_installer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 #include "components/update_client/update_client.h" 39 #include "components/update_client/update_client.h"
40 #include "components/update_client/update_client_errors.h" 40 #include "components/update_client/update_client_errors.h"
41 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
42 #include "content/public/browser/plugin_service.h" 42 #include "content/public/browser/plugin_service.h"
43 #include "content/public/common/content_constants.h" 43 #include "content/public/common/content_constants.h"
44 #include "content/public/common/pepper_plugin_info.h" 44 #include "content/public/common/pepper_plugin_info.h"
45 #include "ppapi/shared_impl/ppapi_permissions.h" 45 #include "ppapi/shared_impl/ppapi_permissions.h"
46 46
47 #if defined(OS_CHROMEOS) 47 #if defined(OS_CHROMEOS)
48 #include "chrome/browser/chromeos/settings/cros_settings.h" 48 #include "chrome/browser/chromeos/settings/cros_settings.h"
49 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
49 #include "chrome/common/chrome_features.h" 50 #include "chrome/common/chrome_features.h"
50 #include "chromeos/dbus/dbus_method_call_status.h" 51 #include "chromeos/dbus/dbus_method_call_status.h"
51 #include "chromeos/dbus/dbus_thread_manager.h" 52 #include "chromeos/dbus/dbus_thread_manager.h"
52 #include "chromeos/dbus/image_loader_client.h" 53 #include "chromeos/dbus/image_loader_client.h"
53 #include "content/public/browser/browser_thread.h" 54 #include "content/public/browser/browser_thread.h"
54 #elif defined(OS_LINUX) 55 #elif defined(OS_LINUX)
55 #include "chrome/common/component_flash_hint_file_linux.h" 56 #include "chrome/common/component_flash_hint_file_linux.h"
56 #endif // defined(OS_CHROMEOS) 57 #endif // defined(OS_CHROMEOS)
57 58
58 using content::BrowserThread; 59 using content::BrowserThread;
(...skipping 15 matching lines...) Expand all
74 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb. 75 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb.
75 const uint8_t kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20, 76 const uint8_t kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20,
76 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11, 77 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11,
77 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70, 78 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70,
78 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c}; 79 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c};
79 #endif // defined(OS_CHROMEOS) 80 #endif // defined(OS_CHROMEOS)
80 81
81 #if defined(OS_CHROMEOS) 82 #if defined(OS_CHROMEOS)
82 void LogRegistrationResult(chromeos::DBusMethodCallStatus call_status, 83 void LogRegistrationResult(chromeos::DBusMethodCallStatus call_status,
83 bool result) { 84 bool result) {
85 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
84 if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) { 86 if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) {
85 LOG(ERROR) << "Call to imageloader service failed."; 87 LOG(ERROR) << "Call to imageloader service failed.";
86 return; 88 return;
87 } 89 }
88 if (!result) 90 if (!result) {
89 LOG(ERROR) << "Component flash registration failed"; 91 LOG(ERROR) << "Component flash registration failed";
92 return;
93 }
94 chromeos::SystemTrayDelegateChromeOS* tray =
95 chromeos::SystemTrayDelegateChromeOS::instance();
96 if (tray) {
97 tray->SetFlashUpdateAvailable();
98 }
90 } 99 }
91 100
92 void ImageLoaderRegistration(const std::string& version, 101 void ImageLoaderRegistration(const std::string& version,
93 const base::FilePath& install_dir) { 102 const base::FilePath& install_dir) {
94 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 103 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
95 chromeos::ImageLoaderClient* loader = 104 chromeos::ImageLoaderClient* loader =
96 chromeos::DBusThreadManager::Get()->GetImageLoaderClient(); 105 chromeos::DBusThreadManager::Get()->GetImageLoaderClient();
97 106
98 if (loader) { 107 if (loader) {
99 loader->RegisterComponent("PepperFlashPlayer", version, install_dir.value(), 108 loader->RegisterComponent("PepperFlashPlayer", version, install_dir.value(),
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 std::unique_ptr<ComponentInstallerTraits> traits( 373 std::unique_ptr<ComponentInstallerTraits> traits(
365 new FlashComponentInstallerTraits); 374 new FlashComponentInstallerTraits);
366 // |cus| will take ownership of |installer| during installer->Register(cus). 375 // |cus| will take ownership of |installer| during installer->Register(cus).
367 DefaultComponentInstaller* installer = 376 DefaultComponentInstaller* installer =
368 new DefaultComponentInstaller(std::move(traits)); 377 new DefaultComponentInstaller(std::move(traits));
369 installer->Register(cus, base::Closure()); 378 installer->Register(cus, base::Closure());
370 #endif // defined(GOOGLE_CHROME_BUILD) 379 #endif // defined(GOOGLE_CHROME_BUILD)
371 } 380 }
372 381
373 } // namespace component_updater 382 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/lifetime/application_lifetime.h » ('j') | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698