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/extensions/bundle_installer.h" | 5 #include "chrome/browser/extensions/bundle_installer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 IDS_EXTENSION_BUNDLE_INSTALLED_HEADING_EXTENSIONS, | 88 IDS_EXTENSION_BUNDLE_INSTALLED_HEADING_EXTENSIONS, |
89 IDS_EXTENSION_BUNDLE_INSTALLED_HEADING_APPS, | 89 IDS_EXTENSION_BUNDLE_INSTALLED_HEADING_APPS, |
90 IDS_EXTENSION_BUNDLE_INSTALLED_HEADING_EXTENSION_APPS | 90 IDS_EXTENSION_BUNDLE_INSTALLED_HEADING_EXTENSION_APPS |
91 } | 91 } |
92 }; | 92 }; |
93 | 93 |
94 } // namespace | 94 } // namespace |
95 | 95 |
96 // static | 96 // static |
97 void BundleInstaller::SetAutoApproveForTesting(bool auto_approve) { | 97 void BundleInstaller::SetAutoApproveForTesting(bool auto_approve) { |
98 CHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)); | 98 CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)); |
99 g_auto_approve_for_test = auto_approve ? PROCEED : ABORT; | 99 g_auto_approve_for_test = auto_approve ? PROCEED : ABORT; |
100 } | 100 } |
101 | 101 |
102 BundleInstaller::Item::Item() : state(STATE_PENDING) {} | 102 BundleInstaller::Item::Item() : state(STATE_PENDING) {} |
103 | 103 |
104 base::string16 BundleInstaller::Item::GetNameForDisplay() { | 104 base::string16 BundleInstaller::Item::GetNameForDisplay() { |
105 base::string16 name = base::UTF8ToUTF16(localized_name); | 105 base::string16 name = base::UTF8ToUTF16(localized_name); |
106 base::i18n::AdjustStringForLocaleDirection(&name); | 106 base::i18n::AdjustStringForLocaleDirection(&name); |
107 return l10n_util::GetStringFUTF16(IDS_EXTENSION_PERMISSION_LINE, name); | 107 return l10n_util::GetStringFUTF16(IDS_EXTENSION_PERMISSION_LINE, name); |
108 } | 108 } |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 void BundleInstaller::OnBrowserAdded(Browser* browser) {} | 354 void BundleInstaller::OnBrowserAdded(Browser* browser) {} |
355 | 355 |
356 void BundleInstaller::OnBrowserRemoved(Browser* browser) { | 356 void BundleInstaller::OnBrowserRemoved(Browser* browser) { |
357 if (browser_ == browser) | 357 if (browser_ == browser) |
358 browser_ = NULL; | 358 browser_ = NULL; |
359 } | 359 } |
360 | 360 |
361 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} | 361 void BundleInstaller::OnBrowserSetLastActive(Browser* browser) {} |
362 | 362 |
363 } // namespace extensions | 363 } // namespace extensions |
OLD | NEW |