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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2774603002: Removes the IsReadingListEnabled flags (Closed)
Patch Set: fix tests Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 40330e450b187f784125aa22990762ef8f88bd24..ef374666ca2d13cdd74fe36863d5251e548d556c 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -42,7 +42,6 @@
#include "components/infobars/core/infobar_manager.h"
#include "components/prefs/pref_service.h"
#include "components/reading_list/core/reading_list_model.h"
-#include "components/reading_list/core/reading_list_switches.h"
#include "components/search_engines/search_engines_pref_names.h"
#include "components/search_engines/template_url_service.h"
#include "components/sessions/core/tab_restore_service_helper.h"
@@ -2537,8 +2536,7 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
[_contextMenuCoordinator addItemWithTitle:title action:action];
}
}
- if (link.SchemeIsHTTPOrHTTPS() &&
- reading_list::switches::IsReadingListEnabled()) {
+ if (link.SchemeIsHTTPOrHTTPS()) {
NSString* innerText = params.link_text;
if ([innerText length] > 0) {
// Add to reading list.
@@ -3356,14 +3354,12 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
if (_isOffTheRecord)
[configuration setInIncognito:YES];
- if (reading_list::switches::IsReadingListEnabled()) {
- if (!_readingListMenuNotifier) {
- _readingListMenuNotifier.reset([[ReadingListMenuNotifier alloc]
- initWithReadingList:ReadingListModelFactory::GetForBrowserState(
- _browserState)]);
- }
- [configuration setReadingListMenuNotifier:_readingListMenuNotifier];
+ if (!_readingListMenuNotifier) {
+ _readingListMenuNotifier.reset([[ReadingListMenuNotifier alloc]
+ initWithReadingList:ReadingListModelFactory::GetForBrowserState(
+ _browserState)]);
}
+ [configuration setReadingListMenuNotifier:_readingListMenuNotifier];
[configuration setUserAgentType:self.userAgentType];
@@ -3504,9 +3500,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
}
- (void)addToReadingListURL:(const GURL&)URL title:(NSString*)title {
- if (!reading_list::switches::IsReadingListEnabled()) {
- return;
- }
base::RecordAction(UserMetricsAction("MobileReadingListAdd"));
ReadingListModel* readingModel =
@@ -4073,7 +4066,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
[self print];
break;
case IDC_ADD_READING_LIST: {
- DCHECK(reading_list::switches::IsReadingListEnabled());
ReadingListAddCommand* command =
base::mac::ObjCCastStrict<ReadingListAddCommand>(sender);
[self addToReadingListURL:[command URL] title:[command title]];
@@ -4083,7 +4075,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
[self showRateThisAppDialog];
break;
case IDC_SHOW_READING_LIST:
- DCHECK(reading_list::switches::IsReadingListEnabled());
[self showReadingList];
break;
case IDC_VOICE_SEARCH:
@@ -4336,7 +4327,6 @@ class BrowserBookmarkModelBridge : public bookmarks::BookmarkModelObserver {
}
- (void)showReadingList {
- DCHECK(reading_list::switches::IsReadingListEnabled());
_readingListCoordinator.reset([[ReadingListCoordinator alloc]
initWithBaseViewController:self
browserState:self.browserState
« no previous file with comments | « ios/chrome/browser/ui/activity_services/activity_service_controller_unittest.mm ('k') | ios/chrome/browser/ui/ntp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698