| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/task_manager/extension_process_resource_provider.h" | 5 #include "chrome/browser/task_manager/extension_process_resource_provider.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 base::string16 extension_name = base::UTF8ToUTF16(GetExtension()->name()); | 91 base::string16 extension_name = base::UTF8ToUTF16(GetExtension()->name()); |
| 92 DCHECK(!extension_name.empty()); | 92 DCHECK(!extension_name.empty()); |
| 93 | 93 |
| 94 Profile* profile = Profile::FromBrowserContext( | 94 Profile* profile = Profile::FromBrowserContext( |
| 95 render_view_host->GetProcess()->GetBrowserContext()); | 95 render_view_host->GetProcess()->GetBrowserContext()); |
| 96 int message_id = util::GetMessagePrefixID( | 96 int message_id = util::GetMessagePrefixID( |
| 97 GetExtension()->is_app(), | 97 GetExtension()->is_app(), |
| 98 true, // is_extension | 98 true, // is_extension |
| 99 profile->IsOffTheRecord(), | 99 profile->IsOffTheRecord(), |
| 100 false, // is_prerender | 100 false, // is_prerender |
| 101 false, // is_instant_overlay |
| 101 IsBackground()); | 102 IsBackground()); |
| 102 title_ = l10n_util::GetStringFUTF16(message_id, extension_name); | 103 title_ = l10n_util::GetStringFUTF16(message_id, extension_name); |
| 103 } | 104 } |
| 104 | 105 |
| 105 ExtensionProcessResource::~ExtensionProcessResource() { | 106 ExtensionProcessResource::~ExtensionProcessResource() { |
| 106 } | 107 } |
| 107 | 108 |
| 108 base::string16 ExtensionProcessResource::GetTitle() const { | 109 base::string16 ExtensionProcessResource::GetTitle() const { |
| 109 return title_; | 110 return title_; |
| 110 } | 111 } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 task_manager_->RemoveResource(resource); | 340 task_manager_->RemoveResource(resource); |
| 340 | 341 |
| 341 // Remove it from the provider. | 342 // Remove it from the provider. |
| 342 resources_.erase(iter); | 343 resources_.erase(iter); |
| 343 | 344 |
| 344 // Finally, delete the resource. | 345 // Finally, delete the resource. |
| 345 delete resource; | 346 delete resource; |
| 346 } | 347 } |
| 347 | 348 |
| 348 } // namespace task_manager | 349 } // namespace task_manager |
| OLD | NEW |