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

Side by Side Diff: chrome/browser/bookmarks/enhanced_bookmarks_features.h

Issue 497563002: [Android] Use correct enhanced bookmarks enabling logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use proper enhanced bookmarks flag logic (changed completely) Created 6 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 #ifndef CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_
6 #define CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ 6 #define CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/common/extension.h" 10 #include "extensions/common/extension.h"
(...skipping 14 matching lines...) Expand all
25 BOOKMARKS_EXPERIMENT_ENUM_SIZE 25 BOOKMARKS_EXPERIMENT_ENUM_SIZE
26 }; 26 };
27 27
28 // Returns true and sets |extension_id| if bookmarks experiment enabled 28 // Returns true and sets |extension_id| if bookmarks experiment enabled
29 // false if no bookmark experiment or extension id is empty. 29 // false if no bookmark experiment or extension id is empty.
30 bool GetBookmarksExperimentExtensionID(const PrefService* user_prefs, 30 bool GetBookmarksExperimentExtensionID(const PrefService* user_prefs,
31 std::string* extension_id); 31 std::string* extension_id);
32 32
33 // Updates bookmark experiment state based on information from Chrome sync 33 // Updates bookmark experiment state based on information from Chrome sync
34 // and Finch experiments. 34 // and Finch experiments.
35 void UpdateBookmarksExperimentState( 35 void UpdateBookmarksExperimentState(
Kibeom Kim (inactive) 2014/08/26 23:54:50 Yaron: I think I need to call this on profile init
Yaron 2014/08/27 00:09:59 Why is this different from desktop versions?
Yaron 2014/08/27 00:12:13 The reason I think it's ok is that Finch is per in
Kibeom Kim (inactive) 2014/08/27 17:21:09 I see, then I'll just call it once on initializati
36 PrefService* user_prefs, 36 PrefService* user_prefs,
37 PrefService* local_state, 37 PrefService* local_state,
38 bool user_signed_in, 38 bool user_signed_in,
39 BookmarksExperimentState experiment_enabled_from_sync); 39 BookmarksExperimentState experiment_enabled_from_sync);
40 40
41 // Sets flag to opt-in user into Finch experiment. 41 // Sets flag to opt-in user into Finch experiment.
42 void ForceFinchBookmarkExperimentIfNeeded( 42 void ForceFinchBookmarkExperimentIfNeeded(
43 PrefService* local_state, 43 PrefService* local_state,
44 BookmarksExperimentState bookmarks_experiment_state); 44 BookmarksExperimentState bookmarks_experiment_state);
45 45
46 #if defined(OS_ANDROID)
47
48 // Returns true if enhanced bookmark salient image prefetching is enabled.
49 // This can be controlled by field trial.
50 bool IsEnhancedBookmarkImageFetchingEnabled(const PrefService* user_prefs);
51
52 // Returns true if enhanced bookmarks experiment is enabled.
53 // Experiment could be enable from Chrome sync or from Finch.
54 bool IsEnhancedBookmarksExperimentEnabled(const PrefService* user_prefs);
55
56 #else
57
46 // Returns true if enhanced bookmarks experiment is enabled. 58 // Returns true if enhanced bookmarks experiment is enabled.
47 // Experiment could be enable from Chrome sync or from Finch. 59 // Experiment could be enable from Chrome sync or from Finch.
48 bool IsEnhancedBookmarksExperimentEnabled(); 60 bool IsEnhancedBookmarksExperimentEnabled();
49 61
50 #if defined(OS_ANDROID)
51 bool IsEnhancedBookmarkImageFetchingEnabled();
52 #endif 62 #endif
53 63
54 // Returns true when flag enable-dom-distiller is set or enabled from Finch. 64 // Returns true when flag enable-dom-distiller is set or enabled from Finch.
55 bool IsEnableDomDistillerSet(); 65 bool IsEnableDomDistillerSet();
56 66
57 // Returns true when flag enable-sync-articles is set or enabled from Finch. 67 // Returns true when flag enable-sync-articles is set or enabled from Finch.
58 bool IsEnableSyncArticlesSet(); 68 bool IsEnableSyncArticlesSet();
59 69
60 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_ 70 #endif // CHROME_BROWSER_BOOKMARKS_ENHANCED_BOOKMARKS_FEATURES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698