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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Common layout constants Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sync/one_click_signin_helper.h" 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 one_click_signin::HISTOGRAM_MAX); 173 one_click_signin::HISTOGRAM_MAX);
174 break; 174 break;
175 case SyncPromoUI::SOURCE_APP_LAUNCHER: 175 case SyncPromoUI::SOURCE_APP_LAUNCHER:
176 UMA_HISTOGRAM_ENUMERATION("Signin.AppLauncherActions", action, 176 UMA_HISTOGRAM_ENUMERATION("Signin.AppLauncherActions", action,
177 one_click_signin::HISTOGRAM_MAX); 177 one_click_signin::HISTOGRAM_MAX);
178 break; 178 break;
179 case SyncPromoUI::SOURCE_APPS_PAGE_LINK: 179 case SyncPromoUI::SOURCE_APPS_PAGE_LINK:
180 UMA_HISTOGRAM_ENUMERATION("Signin.AppsPageLinkActions", action, 180 UMA_HISTOGRAM_ENUMERATION("Signin.AppsPageLinkActions", action,
181 one_click_signin::HISTOGRAM_MAX); 181 one_click_signin::HISTOGRAM_MAX);
182 break; 182 break;
183 case SyncPromoUI::SOURCE_BOOKMARK_BUBBLE:
184 UMA_HISTOGRAM_ENUMERATION("Signin.BookmarkBubbleActions", action,
185 one_click_signin::HISTOGRAM_MAX);
186 break;
183 default: 187 default:
184 NOTREACHED() << "Invalid Source"; 188 // This switch statement needs to be updated when the enum Source changes.
189 COMPILE_ASSERT(SyncPromoUI::SOURCE_UNKNOWN == 9,
190 kSourceEnumHasChangedButNotThisSwitchStatement);
191 NOTREACHED();
185 return; 192 return;
186 } 193 }
187 UMA_HISTOGRAM_ENUMERATION("Signin.AllAccessPointActions", action, 194 UMA_HISTOGRAM_ENUMERATION("Signin.AllAccessPointActions", action,
188 one_click_signin::HISTOGRAM_MAX); 195 one_click_signin::HISTOGRAM_MAX);
189 } 196 }
190 197
191 void LogOneClickHistogramValue(int action) { 198 void LogOneClickHistogramValue(int action) {
192 UMA_HISTOGRAM_ENUMERATION("Signin.OneClickActions", action, 199 UMA_HISTOGRAM_ENUMERATION("Signin.OneClickActions", action,
193 one_click_signin::HISTOGRAM_MAX); 200 one_click_signin::HISTOGRAM_MAX);
194 UMA_HISTOGRAM_ENUMERATION("Signin.AllAccessPointActions", action, 201 UMA_HISTOGRAM_ENUMERATION("Signin.AllAccessPointActions", action,
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 contents->GetController().LoadURL(redirect_url_, 1274 contents->GetController().LoadURL(redirect_url_,
1268 content::Referrer(), 1275 content::Referrer(),
1269 content::PAGE_TRANSITION_AUTO_TOPLEVEL, 1276 content::PAGE_TRANSITION_AUTO_TOPLEVEL,
1270 std::string()); 1277 std::string());
1271 } 1278 }
1272 1279
1273 // Clear the redirect URL. 1280 // Clear the redirect URL.
1274 redirect_url_ = GURL(); 1281 redirect_url_ = GURL();
1275 sync_service->RemoveObserver(this); 1282 sync_service->RemoveObserver(this);
1276 } 1283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698