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/printing/cloud_print/privet_notifications.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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/printing/cloud_print/privet_notifications.h" 5 #include "chrome/browser/printing/cloud_print/privet_notifications.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 DCHECK_EQ(1, button_index); 371 DCHECK_EQ(1, button_index);
372 ReportPrivetUmaEvent(PRIVET_DISABLE_NOTIFICATIONS_CLICKED); 372 ReportPrivetUmaEvent(PRIVET_DISABLE_NOTIFICATIONS_CLICKED);
373 DisableNotifications(); 373 DisableNotifications();
374 } 374 }
375 375
376 void PrivetNotificationDelegate::OpenTab(const GURL& url) { 376 void PrivetNotificationDelegate::OpenTab(const GURL& url) {
377 Profile* profile = Profile::FromBrowserContext(profile_); 377 Profile* profile = Profile::FromBrowserContext(profile_);
378 chrome::NavigateParams params(profile, url, 378 chrome::NavigateParams params(profile, url,
379 ui::PAGE_TRANSITION_AUTO_TOPLEVEL); 379 ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
380 params.disposition = NEW_FOREGROUND_TAB; 380 params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
381 chrome::Navigate(&params); 381 chrome::Navigate(&params);
382 } 382 }
383 383
384 void PrivetNotificationDelegate::DisableNotifications() { 384 void PrivetNotificationDelegate::DisableNotifications() {
385 Profile* profile = Profile::FromBrowserContext(profile_); 385 Profile* profile = Profile::FromBrowserContext(profile_);
386 profile->GetPrefs()->SetBoolean(prefs::kLocalDiscoveryNotificationsEnabled, 386 profile->GetPrefs()->SetBoolean(prefs::kLocalDiscoveryNotificationsEnabled,
387 false); 387 false);
388 } 388 }
389 389
390 } // namespace cloud_print 390 } // namespace cloud_print
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698