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

Side by Side Diff: chrome/browser/ui/views/session_crashed_bubble_view.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ui/views/session_crashed_bubble_view.h" 5 #include "chrome/browser/ui/views/session_crashed_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8
9 #include <string> 8 #include <string>
9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/metrics/field_trial.h" 16 #include "base/metrics/field_trial.h"
17 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
18 #include "base/prefs/pref_service.h" 18 #include "base/prefs/pref_service.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // Schedule a task to run GoogleUpdateSettings::GetCollectStatsConsent() on 160 // Schedule a task to run GoogleUpdateSettings::GetCollectStatsConsent() on
161 // FILE thread, since it does IO. Then, call 161 // FILE thread, since it does IO. Then, call
162 // SessionCrashedBubbleView::ShowForReal with the result. 162 // SessionCrashedBubbleView::ShowForReal with the result.
163 content::BrowserThread::PostTaskAndReplyWithResult( 163 content::BrowserThread::PostTaskAndReplyWithResult(
164 content::BrowserThread::FILE, 164 content::BrowserThread::FILE,
165 FROM_HERE, 165 FROM_HERE,
166 base::Bind(&GoogleUpdateSettings::GetCollectStatsConsent), 166 base::Bind(&GoogleUpdateSettings::GetCollectStatsConsent),
167 base::Bind(&SessionCrashedBubbleView::ShowForReal, 167 base::Bind(&SessionCrashedBubbleView::ShowForReal,
168 base::Passed(&browser_observer))); 168 base::Passed(&browser_observer)));
169 #else 169 #else
170 SessionCrashedBubbleView::ShowForReal(browser_observer.Pass(), false); 170 SessionCrashedBubbleView::ShowForReal(std::move(browser_observer), false);
171 #endif // defined(GOOGLE_CHROME_BUILD) 171 #endif // defined(GOOGLE_CHROME_BUILD)
172 172
173 return true; 173 return true;
174 } 174 }
175 175
176 // static 176 // static
177 void SessionCrashedBubbleView::ShowForReal( 177 void SessionCrashedBubbleView::ShowForReal(
178 scoped_ptr<BrowserRemovalObserver> browser_observer, 178 scoped_ptr<BrowserRemovalObserver> browser_observer,
179 bool uma_opted_in_already) { 179 bool uma_opted_in_already) {
180 // Determine whether or not the UMA opt-in option should be offered. It is 180 // Determine whether or not the UMA opt-in option should be offered. It is
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 if (uma_option_ && uma_option_->checked()) { 459 if (uma_option_ && uma_option_->checked()) {
460 InitiateMetricsReportingChange(true, OnMetricsReportingCallbackType()); 460 InitiateMetricsReportingChange(true, OnMetricsReportingCallbackType());
461 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN); 461 RecordBubbleHistogramValue(SESSION_CRASHED_BUBBLE_UMA_OPTIN);
462 } 462 }
463 CloseBubble(); 463 CloseBubble();
464 } 464 }
465 465
466 void SessionCrashedBubbleView::CloseBubble() { 466 void SessionCrashedBubbleView::CloseBubble() {
467 GetWidget()->Close(); 467 GetWidget()->Close();
468 } 468 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698