| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/recovery_component_installer.h" | 5 #include "chrome/browser/component_updater/recovery_component_installer.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 command_line.AppendArg(version_string); | 111 command_line.AppendArg(version_string); |
| 112 } | 112 } |
| 113 | 113 |
| 114 return command_line; | 114 return command_line; |
| 115 } | 115 } |
| 116 | 116 |
| 117 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
| 118 scoped_ptr<base::DictionaryValue> ReadManifest(const base::FilePath& manifest) { | 118 scoped_ptr<base::DictionaryValue> ReadManifest(const base::FilePath& manifest) { |
| 119 JSONFileValueDeserializer deserializer(manifest); | 119 JSONFileValueDeserializer deserializer(manifest); |
| 120 std::string error; | 120 std::string error; |
| 121 scoped_ptr<base::Value> root(deserializer.Deserialize(NULL, &error)); | 121 scoped_ptr<base::Value> root = deserializer.Deserialize(NULL, &error); |
| 122 if (root.get() && root->IsType(base::Value::TYPE_DICTIONARY)) { | 122 if (root.get() && root->IsType(base::Value::TYPE_DICTIONARY)) { |
| 123 return scoped_ptr<base::DictionaryValue>( | 123 return scoped_ptr<base::DictionaryValue>( |
| 124 static_cast<base::DictionaryValue*>(root.release())); | 124 static_cast<base::DictionaryValue*>(root.release())); |
| 125 } | 125 } |
| 126 return scoped_ptr<base::DictionaryValue>(); | 126 return scoped_ptr<base::DictionaryValue>(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void WaitForElevatedInstallToComplete(base::Process process) { | 129 void WaitForElevatedInstallToComplete(base::Process process) { |
| 130 int installer_exit_code = 0; | 130 int installer_exit_code = 0; |
| 131 const base::TimeDelta kMaxWaitTime = base::TimeDelta::FromSeconds(600); | 131 const base::TimeDelta kMaxWaitTime = base::TimeDelta::FromSeconds(600); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 #endif // OS_WIN | 417 #endif // OS_WIN |
| 418 prefs->SetBoolean(prefs::kRecoveryComponentNeedsElevation, false); | 418 prefs->SetBoolean(prefs::kRecoveryComponentNeedsElevation, false); |
| 419 } | 419 } |
| 420 | 420 |
| 421 void DeclinedElevatedRecoveryInstall(PrefService* prefs) { | 421 void DeclinedElevatedRecoveryInstall(PrefService* prefs) { |
| 422 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 422 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 423 prefs->SetBoolean(prefs::kRecoveryComponentNeedsElevation, false); | 423 prefs->SetBoolean(prefs::kRecoveryComponentNeedsElevation, false); |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace component_updater | 426 } // namespace component_updater |
| OLD | NEW |