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/chromeos/policy/cloud_external_data_policy_observer.h" | 5 #include "chrome/browser/chromeos/policy/cloud_external_data_policy_observer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
| 8 #include <utility> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
15 #include "base/values.h" | 16 #include "base/values.h" |
16 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
17 #include "chrome/browser/chromeos/policy/device_local_account.h" | 18 #include "chrome/browser/chromeos/policy/device_local_account.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 NOTREACHED(); | 305 NOTREACHED(); |
305 } | 306 } |
306 } | 307 } |
307 | 308 |
308 void CloudExternalDataPolicyObserver::OnExternalDataFetched( | 309 void CloudExternalDataPolicyObserver::OnExternalDataFetched( |
309 const std::string& user_id, | 310 const std::string& user_id, |
310 scoped_ptr<std::string> data) { | 311 scoped_ptr<std::string> data) { |
311 FetchWeakPtrMap::iterator it = fetch_weak_ptrs_.find(user_id); | 312 FetchWeakPtrMap::iterator it = fetch_weak_ptrs_.find(user_id); |
312 DCHECK(it != fetch_weak_ptrs_.end()); | 313 DCHECK(it != fetch_weak_ptrs_.end()); |
313 fetch_weak_ptrs_.erase(it); | 314 fetch_weak_ptrs_.erase(it); |
314 delegate_->OnExternalDataFetched(policy_, user_id, data.Pass()); | 315 delegate_->OnExternalDataFetched(policy_, user_id, std::move(data)); |
315 } | 316 } |
316 | 317 |
317 } // namespace policy | 318 } // namespace policy |
OLD | NEW |