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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 2152373003: [Extensions] Code Cleanup - Remove redundant smart-ptr get()s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 082822b843de360c5af776ec9653ec3abb9dad99..1b6efc24297405eefa0d8a899f6cbc0b82dbbc3b 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -135,7 +135,7 @@ class ApiParameterExtractor {
WindowController::TypeFilter type_filters() {
if (params_->get_info.get() && params_->get_info->window_types.get())
return WindowController::GetFilterFromWindowTypes(
- *params_->get_info->window_types.get());
+ *params_->get_info->window_types);
return WindowController::kNoWindowFilter;
}
@@ -209,7 +209,7 @@ template <typename T>
void AssignOptionalValue(const std::unique_ptr<T>& source,
std::unique_ptr<T>& destination) {
if (source.get()) {
- destination.reset(new T(*source.get()));
+ destination.reset(new T(*source));
}
}
@@ -1459,7 +1459,7 @@ bool TabsMoveFunction::RunSync() {
return false;
} else if (num_tabs == 1) {
std::unique_ptr<base::Value> value;
- CHECK(tab_values.get()->Remove(0, &value));
+ CHECK(tab_values->Remove(0, &value));
SetResult(std::move(value));
} else {
// Only return the results as an array if there are multiple tabs.
@@ -1639,7 +1639,7 @@ bool TabsRemoveFunction::RunSync() {
}
} else {
EXTENSION_FUNCTION_VALIDATE(params->tab_ids.as_integer);
- if (!RemoveTab(*params->tab_ids.as_integer.get()))
+ if (!RemoveTab(*params->tab_ids.as_integer))
return false;
}
return true;

Powered by Google App Engine
This is Rietveld 408576698