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

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: Display "Restart to update" dialog to Chrome OS users. 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 "base/feature_list.h" 48 #include "base/feature_list.h"
49 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
49 #include "chromeos/dbus/dbus_method_call_status.h" 50 #include "chromeos/dbus/dbus_method_call_status.h"
50 #include "chromeos/dbus/dbus_thread_manager.h" 51 #include "chromeos/dbus/dbus_thread_manager.h"
51 #include "chromeos/dbus/image_loader_client.h" 52 #include "chromeos/dbus/image_loader_client.h"
52 #include "content/public/browser/browser_thread.h" 53 #include "content/public/browser/browser_thread.h"
53 #elif defined(OS_LINUX) 54 #elif defined(OS_LINUX)
54 #include "chrome/common/component_flash_hint_file_linux.h" 55 #include "chrome/common/component_flash_hint_file_linux.h"
55 #endif // defined(OS_CHROMEOS) 56 #endif // defined(OS_CHROMEOS)
56 57
57 using content::BrowserThread; 58 using content::BrowserThread;
58 using content::PluginService; 59 using content::PluginService;
(...skipping 14 matching lines...) Expand all
73 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb. 74 // CRX hash. The extension id is: mimojjlkmoijpicakmndhoigimigcmbb.
74 const uint8_t kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20, 75 const uint8_t kSha2Hash[] = {0xc8, 0xce, 0x99, 0xba, 0xce, 0x89, 0xf8, 0x20,
75 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11, 76 0xac, 0xd3, 0x7e, 0x86, 0x8c, 0x86, 0x2c, 0x11,
76 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70, 77 0xb9, 0x40, 0xc5, 0x55, 0xaf, 0x08, 0x63, 0x70,
77 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c}; 78 0x54, 0xf9, 0x56, 0xd3, 0xe7, 0x88, 0xba, 0x8c};
78 #endif // defined(OS_CHROMEOS) 79 #endif // defined(OS_CHROMEOS)
79 80
80 #if defined(OS_CHROMEOS) 81 #if defined(OS_CHROMEOS)
81 void LogRegistrationResult(chromeos::DBusMethodCallStatus call_status, 82 void LogRegistrationResult(chromeos::DBusMethodCallStatus call_status,
82 bool result) { 83 bool result) {
84 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
83 if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) { 85 if (call_status != chromeos::DBUS_METHOD_CALL_SUCCESS) {
84 LOG(ERROR) << "Call to imageloader service failed."; 86 LOG(ERROR) << "Call to imageloader service failed.";
85 return; 87 return;
86 } 88 }
87 if (!result) 89 if (!result) {
88 LOG(ERROR) << "Component flash registration failed"; 90 LOG(ERROR) << "Component flash registration failed";
91 return;
92 }
93 chromeos::SystemTrayDelegateChromeOS* tray =
94 chromeos::SystemTrayDelegateChromeOS::Get();
95 if (tray) {
96 tray->SetFlashUpdateAvailable();
97 }
89 } 98 }
90 99
91 void ImageLoaderRegistration(const std::string& version, 100 void ImageLoaderRegistration(const std::string& version,
92 const base::FilePath& install_dir) { 101 const base::FilePath& install_dir) {
93 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 102 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
94 chromeos::ImageLoaderClient* loader = 103 chromeos::ImageLoaderClient* loader =
95 chromeos::DBusThreadManager::Get()->GetImageLoaderClient(); 104 chromeos::DBusThreadManager::Get()->GetImageLoaderClient();
96 105
97 if (loader) { 106 if (loader) {
98 loader->RegisterComponent("PepperFlashPlayer", version, install_dir.value(), 107 loader->RegisterComponent("PepperFlashPlayer", version, install_dir.value(),
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 std::unique_ptr<ComponentInstallerTraits> traits( 335 std::unique_ptr<ComponentInstallerTraits> traits(
327 new FlashComponentInstallerTraits); 336 new FlashComponentInstallerTraits);
328 // |cus| will take ownership of |installer| during installer->Register(cus). 337 // |cus| will take ownership of |installer| during installer->Register(cus).
329 DefaultComponentInstaller* installer = 338 DefaultComponentInstaller* installer =
330 new DefaultComponentInstaller(std::move(traits)); 339 new DefaultComponentInstaller(std::move(traits));
331 installer->Register(cus, base::Closure()); 340 installer->Register(cus, base::Closure());
332 #endif // defined(GOOGLE_CHROME_BUILD) 341 #endif // defined(GOOGLE_CHROME_BUILD)
333 } 342 }
334 343
335 } // namespace component_updater 344 } // namespace component_updater
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/lifetime/application_lifetime.h » ('j') | chrome/browser/lifetime/application_lifetime.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698