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

Side by Side Diff: chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 12 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 unified diff | Download patch
OLDNEW
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/extensions/api/preference/chrome_direct_setting_api.h" 5 #include "chrome/browser/extensions/api/preference/chrome_direct_setting_api.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
9 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/prefs/pref_change_registrar.h" 13 #include "base/prefs/pref_change_registrar.h"
12 #include "base/prefs/pref_service.h" 14 #include "base/prefs/pref_service.h"
13 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
14 #include "chrome/browser/extensions/api/preference/preference_api_constants.h" 16 #include "chrome/browser/extensions/api/preference/preference_api_constants.h"
15 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
16 #include "extensions/browser/extension_registry.h" 18 #include "extensions/browser/extension_registry.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // histograms, which is to track which event types are waking up event 153 // histograms, which is to track which event types are waking up event
152 // pages, or which are delivered to persistent background pages. Simply 154 // pages, or which are delivered to persistent background pages. Simply
153 // "a setting changed" is enough detail for that. However if we try to 155 // "a setting changed" is enough detail for that. However if we try to
154 // use these histograms for any fine-grained logic (like removing the 156 // use these histograms for any fine-grained logic (like removing the
155 // string event name altogether), or if we discover this event is 157 // string event name altogether), or if we discover this event is
156 // firing a lot and want to understand that better, then this will need 158 // firing a lot and want to understand that better, then this will need
157 // to change. 159 // to change.
158 events::HistogramValue histogram_value = 160 events::HistogramValue histogram_value =
159 events::TYPES_PRIVATE_CHROME_DIRECT_SETTING_ON_CHANGE; 161 events::TYPES_PRIVATE_CHROME_DIRECT_SETTING_ON_CHANGE;
160 scoped_ptr<Event> event( 162 scoped_ptr<Event> event(
161 new Event(histogram_value, event_name, args_copy.Pass())); 163 new Event(histogram_value, event_name, std::move(args_copy)));
162 router->DispatchEventToExtension(extension_id, event.Pass()); 164 router->DispatchEventToExtension(extension_id, std::move(event));
163 } 165 }
164 } 166 }
165 } 167 }
166 } 168 }
167 169
168 } // namespace chromedirectsetting 170 } // namespace chromedirectsetting
169 } // namespace extensions 171 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698