diff options
-rw-r--r-- | chrome/app/chromium_strings.grd | 11 | ||||
-rw-r--r-- | chrome/app/google_chrome_strings.grd | 11 | ||||
-rw-r--r-- | chrome/app/nibs/Preferences.xib | 281 | ||||
-rw-r--r-- | chrome/app/resources/locale_settings.grd | 5 | ||||
-rw-r--r-- | chrome/browser/background_mode_manager.cc | 42 | ||||
-rw-r--r-- | chrome/browser/background_mode_manager.h | 16 | ||||
-rw-r--r-- | chrome/browser/background_mode_manager_unittest.cc | 49 | ||||
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.h | 6 | ||||
-rw-r--r-- | chrome/browser/cocoa/preferences_window_controller.mm | 35 | ||||
-rw-r--r-- | chrome/browser/dom_ui/options/advanced_options_handler.cc | 13 | ||||
-rw-r--r-- | chrome/browser/gtk/options/advanced_contents_gtk.cc | 108 | ||||
-rw-r--r-- | chrome/browser/gtk/options/advanced_contents_gtk.h | 2 | ||||
-rw-r--r-- | chrome/browser/options_util.cc | 1 | ||||
-rw-r--r-- | chrome/browser/resources/options.html | 1 | ||||
-rw-r--r-- | chrome/browser/resources/options/advanced_options.html | 15 | ||||
-rw-r--r-- | chrome/browser/ui/views/options/advanced_contents_view.cc | 91 | ||||
-rw-r--r-- | chrome/common/pref_names.cc | 4 | ||||
-rw-r--r-- | chrome/common/pref_names.h | 1 |
18 files changed, 50 insertions, 642 deletions
diff --git a/chrome/app/chromium_strings.grd b/chrome/app/chromium_strings.grd index 8a89544..001e26d 100644 --- a/chrome/app/chromium_strings.grd +++ b/chrome/app/chromium_strings.grd @@ -394,17 +394,6 @@ be available for now. --> Chromium installation directory seems to be in use. Please reboot your computer and try again. </message> <!-- Options Dialog --> - <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS" desc="The title text in the options panel that provides options for installed web apps."> - Chromium Web Apps - </message> - <if expr="os == 'darwin'"> - <message name="IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE" desc="The label in the checkbox that enables launch-at-login."> - Open Chromium at login and launch background web apps - </message> - <message name="IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE_DESCRIPTION" desc="The description text under the checkbox that enables launch-at-login."> - Web apps are only active while Chromium is running. - </message> - </if> <message name="IDS_OPTIONS_DISABLE_SERVICES" desc="The text in the options panel that describes how we use web services to improve browsing experience."> Chromium may use web services to improve your browsing experience. You may optionally disable these services. </message> diff --git a/chrome/app/google_chrome_strings.grd b/chrome/app/google_chrome_strings.grd index 5ebaed8..ccd7260 100644 --- a/chrome/app/google_chrome_strings.grd +++ b/chrome/app/google_chrome_strings.grd @@ -445,17 +445,6 @@ Chrome supports. --> Google Chrome installation directory seems to be in use. Please reboot your computer and try again. </message> <!-- Options Dialog --> - <message name="IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS" desc="The title text in the options panel that provides options for installed web apps."> - Google Chrome Web Apps - </message> - <if expr="os == 'darwin'"> - <message name="IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE" desc="The label in the checkbox that enables launch-at-login."> - Open Google Chrome at login and launch background web apps - </message> - <message name="IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE_DESCRIPTION" desc="The description text under the checkbox that enables launch-at-login."> - Web apps are only active while Google Chrome is running. - </message> - </if> <message name="IDS_OPTIONS_DISABLE_SERVICES" desc="The text in the options panel that describes how we use web services to improve browsing experience."> Google Chrome may use web services to improve your browsing experience. You may optionally disable these services. </message> diff --git a/chrome/app/nibs/Preferences.xib b/chrome/app/nibs/Preferences.xib index 769190d..dfca285 100644 --- a/chrome/app/nibs/Preferences.xib +++ b/chrome/app/nibs/Preferences.xib @@ -3,19 +3,19 @@ <data> <int key="IBDocument.SystemTarget">1050</int> <string key="IBDocument.SystemVersion">10F569</string> - <string key="IBDocument.InterfaceBuilderVersion">804</string> + <string key="IBDocument.InterfaceBuilderVersion">788</string> <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">461.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">804</string> + <string key="NS.object.0">788</string> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> <integer value="481"/> - <integer value="74"/> <integer value="692"/> <integer value="482"/> + <integer value="74"/> <integer value="159"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> @@ -171,7 +171,7 @@ <object class="NSButton" id="596669929"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 354}, {395, 18}}</string> + <string key="NSFrame">{{30, 259}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="201482610"> @@ -202,7 +202,7 @@ <object class="NSButton" id="602116533"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">265</int> - <string key="NSFrame">{{356, 523}, {73, 32}}</string> + <string key="NSFrame">{{356, 428}, {73, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="82310084"> @@ -219,22 +219,22 @@ <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSTextField" id="499998551"> + <object class="NSTextField" id="1032231978"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 83}, {447, 17}}</string> + <string key="NSFrame">{{17, 717}, {447, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="701701435"> + <object class="NSTextFieldCell" key="NSCell" id="710610494"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">272629760</int> - <string key="NSContents">^IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS</string> + <string key="NSContents">^IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY</string> <object class="NSFont" key="NSSupport" id="290273273"> <string key="NSName">LucidaGrande-Bold</string> <double key="NSSize">13</double> <int key="NSfFlags">16</int> </object> - <reference key="NSControlView" ref="499998551"/> + <reference key="NSControlView" ref="1032231978"/> <bool key="NSDrawsBackground">YES</bool> <object class="NSColor" key="NSBackgroundColor" id="592613688"> <int key="NSColorSpace">6</int> @@ -256,27 +256,10 @@ </object> </object> </object> - <object class="NSTextField" id="1032231978"> - <reference key="NSNextResponder" ref="1016273328"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 812}, {447, 17}}</string> - <reference key="NSSuperview" ref="1016273328"/> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="710610494"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">272629760</int> - <string key="NSContents">^IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY</string> - <reference key="NSSupport" ref="290273273"/> - <reference key="NSControlView" ref="1032231978"/> - <bool key="NSDrawsBackground">YES</bool> - <reference key="NSBackgroundColor" ref="592613688"/> - <reference key="NSTextColor" ref="748094473"/> - </object> - </object> <object class="NSTextField" id="287656702"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{17, 398}, {409, 17}}</string> + <string key="NSFrame">{{17, 303}, {409, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="237538019"> @@ -292,7 +275,7 @@ <object class="NSTextField" id="412658410"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{29, 468}, {397, 17}}</string> + <string key="NSFrame">{{29, 373}, {397, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="786981193"> @@ -309,30 +292,10 @@ <reference key="NSTextColor" ref="748094473"/> </object> </object> - <object class="NSTextField" id="802144138"> - <reference key="NSNextResponder" ref="1016273328"/> - <int key="NSvFlags">266</int> - <string key="NSFrame">{{41, 39}, {405, 14}}</string> - <reference key="NSSuperview" ref="1016273328"/> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="132041415"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">272764928</int> - <string key="NSContents">^IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE_DESCRIPTION</string> - <object class="NSFont" key="NSSupport" id="26"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">11</double> - <int key="NSfFlags">3100</int> - </object> - <reference key="NSControlView" ref="802144138"/> - <reference key="NSBackgroundColor" ref="592613688"/> - <reference key="NSTextColor" ref="748094473"/> - </object> - </object> <object class="NSTextField" id="1043699198"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{29, 735}, {397, 17}}</string> + <string key="NSFrame">{{29, 640}, {397, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="494850700"> @@ -348,7 +311,7 @@ <object class="NSButton" id="348105916"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{38, 427}, {158, 32}}</string> + <string key="NSFrame">{{38, 332}, {158, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1018797611"> @@ -368,7 +331,7 @@ <object class="NSButton" id="480577047"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 675}, {395, 18}}</string> + <string key="NSFrame">{{30, 580}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="298042898"> @@ -390,7 +353,7 @@ <object class="NSButton" id="808321623"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 655}, {395, 18}}</string> + <string key="NSFrame">{{30, 560}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="874031585"> @@ -412,7 +375,7 @@ <object class="NSButton" id="139965100"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 635}, {395, 18}}</string> + <string key="NSFrame">{{30, 540}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="647261577"> @@ -434,7 +397,7 @@ <object class="NSButton" id="514356928"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{38, 136}, {174, 32}}</string> + <string key="NSFrame">{{38, 41}, {174, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="821186353"> @@ -454,7 +417,7 @@ <object class="NSTextField" id="860741341"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{17, 200}, {409, 17}}</string> + <string key="NSFrame">{{17, 105}, {409, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="240354523"> @@ -470,7 +433,7 @@ <object class="NSButton" id="217654608"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 615}, {395, 18}}</string> + <string key="NSFrame">{{30, 520}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="935362863"> @@ -492,7 +455,7 @@ <object class="NSTextField" id="886068350"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{29, 175}, {397, 17}}</string> + <string key="NSFrame">{{29, 80}, {397, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="550006091"> @@ -508,7 +471,7 @@ <object class="NSButton" id="733677494"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 113}, {395, 18}}</string> + <string key="NSFrame">{{30, 18}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="694359929"> @@ -530,7 +493,7 @@ <object class="NSTextField" id="630848197"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 560}, {447, 17}}</string> + <string key="NSFrame">{{17, 465}, {447, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="660352048"> @@ -555,7 +518,7 @@ <string>NSFilenamesPboardType</string> </object> </object> - <string key="NSFrame">{{25, 533}, {329, 17}}</string> + <string key="NSFrame">{{25, 438}, {329, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSPathCell" key="NSCell" id="25958950"> @@ -576,7 +539,7 @@ <object class="NSButton" id="928184762"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{42, 505}, {383, 18}}</string> + <string key="NSFrame">{{42, 410}, {383, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="731161158"> @@ -598,7 +561,7 @@ <object class="NSButton" id="777041502"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{26, 320}, {170, 32}}</string> + <string key="NSFrame">{{26, 225}, {170, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="526979400"> @@ -618,7 +581,7 @@ <object class="NSButton" id="346222444"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 595}, {395, 18}}</string> + <string key="NSFrame">{{30, 500}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="209704674"> @@ -637,30 +600,10 @@ <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="1011623445"> - <reference key="NSNextResponder" ref="1016273328"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{44, 20}, {96, 16}}</string> - <reference key="NSSuperview" ref="1016273328"/> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="146213088"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">0</int> - <string key="NSContents">^IDS_LEARN_MORE</string> - <reference key="NSSupport" ref="445696277"/> - <reference key="NSControlView" ref="1011623445"/> - <int key="NSButtonFlags">-2038284033</int> - <int key="NSButtonFlags2">134</int> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">200</int> - <int key="NSPeriodicInterval">25</int> - </object> - </object> <object class="NSButton" id="732733616"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{32, 711}, {96, 16}}</string> + <string key="NSFrame">{{32, 616}, {96, 16}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="21803731"> @@ -680,7 +623,7 @@ <object class="NSButton" id="553918619"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{279, 764}, {150, 32}}</string> + <string key="NSFrame">{{279, 669}, {150, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="871001089"> @@ -700,7 +643,7 @@ <object class="NSButton" id="246942000"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{26, 764}, {253, 32}}</string> + <string key="NSFrame">{{26, 669}, {253, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="42833123"> @@ -717,32 +660,10 @@ <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="913950857"> - <reference key="NSNextResponder" ref="1016273328"/> - <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 59}, {395, 18}}</string> - <reference key="NSSuperview" ref="1016273328"/> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="833797989"> - <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">0</int> - <string key="NSContents">^IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE</string> - <reference key="NSSupport" ref="445696277"/> - <reference key="NSControlView" ref="913950857"/> - <int key="NSButtonFlags">1211912703</int> - <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="434417247"/> - <reference key="NSAlternateImage" ref="927168675"/> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">200</int> - <int key="NSPeriodicInterval">25</int> - </object> - </object> <object class="NSButton" id="332489843"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">266</int> - <string key="NSFrame">{{30, 374}, {395, 18}}</string> + <string key="NSFrame">{{30, 279}, {395, 18}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1008555633"> @@ -764,7 +685,7 @@ <object class="NSTextField" id="724151236"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 293}, {409, 17}}</string> + <string key="NSFrame">{{17, 198}, {409, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="305152492"> @@ -780,7 +701,7 @@ <object class="NSTextField" id="953228172"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{29, 268}, {397, 17}}</string> + <string key="NSFrame">{{29, 173}, {397, 17}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="932480195"> @@ -796,7 +717,7 @@ <object class="NSButton" id="383918134"> <reference key="NSNextResponder" ref="1016273328"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{38, 229}, {170, 32}}</string> + <string key="NSFrame">{{38, 134}, {170, 32}}</string> <reference key="NSSuperview" ref="1016273328"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="626667550"> @@ -814,7 +735,7 @@ </object> </object> </object> - <string key="NSFrameSize">{443, 849}</string> + <string key="NSFrameSize">{443, 754}</string> <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> </object> @@ -1343,7 +1264,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSCellFlags">75628096</int> <int key="NSCellFlags2">2048</int> <string key="NSContents"/> - <reference key="NSSupport" ref="26"/> + <object class="NSFont" key="NSSupport" id="26"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">11</double> + <int key="NSfFlags">3100</int> + </object> <object class="NSColor" key="NSBackgroundColor"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MC4zMzMzMzI5OQA</bytes> @@ -3894,62 +3819,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="connectionID">723</int> </object> <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">backgroundModeLearnMore:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="1011623445"/> - </object> - <int key="connectionID">732</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBBindingConnection" key="connection"> - <string key="label">value: backgroundModeEnabled</string> - <reference key="source" ref="913950857"/> - <reference key="destination" ref="1001"/> - <object class="NSNibBindingConnector" key="connector"> - <reference key="NSSource" ref="913950857"/> - <reference key="NSDestination" ref="1001"/> - <string key="NSLabel">value: backgroundModeEnabled</string> - <string key="NSBinding">value</string> - <string key="NSKeyPath">backgroundModeEnabled</string> - <int key="NSNibBindingConnectorVersion">2</int> - </object> - </object> - <int key="connectionID">733</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">backgroundModeTitle_</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="499998551"/> - </object> - <int key="connectionID">752</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">backgroundModeCheckbox_</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="913950857"/> - </object> - <int key="connectionID">753</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">backgroundModeDescription_</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="802144138"/> - </object> - <int key="connectionID">754</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">backgroundModeLearnMore_</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="1011623445"/> - </object> - <int key="connectionID">756</int> - </object> - <object class="IBConnectionRecord"> <object class="IBBindingConnection" key="connection"> <string key="label">enabled: passwordManagerChoiceEnabled</string> <reference key="source" ref="1019357609"/> @@ -4234,11 +4103,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="860741341"/> <reference ref="514356928"/> <reference ref="332489843"/> - <reference ref="499998551"/> - <reference ref="802144138"/> - <reference ref="913950857"/> <reference ref="732733616"/> - <reference ref="1011623445"/> </object> <reference key="parent" ref="0"/> <string key="objectName">Under the Hood Content</string> @@ -5456,62 +5321,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="objectName">Personal Stuff Sync Group Cont</string> </object> <object class="IBObjectRecord"> - <int key="objectID">740</int> - <reference key="object" ref="499998551"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="701701435"/> - </object> - <reference key="parent" ref="1016273328"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">741</int> - <reference key="object" ref="701701435"/> - <reference key="parent" ref="499998551"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">742</int> - <reference key="object" ref="913950857"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="833797989"/> - </object> - <reference key="parent" ref="1016273328"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">743</int> - <reference key="object" ref="833797989"/> - <reference key="parent" ref="913950857"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">745</int> - <reference key="object" ref="802144138"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="132041415"/> - </object> - <reference key="parent" ref="1016273328"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">746</int> - <reference key="object" ref="132041415"/> - <reference key="parent" ref="802144138"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">747</int> - <reference key="object" ref="1011623445"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="146213088"/> - </object> - <reference key="parent" ref="1016273328"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">748</int> - <reference key="object" ref="146213088"/> - <reference key="parent" ref="1011623445"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">768</int> <reference key="object" ref="846108626"/> <object class="NSMutableArray" key="children"> @@ -5746,8 +5555,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>71.IBPluginDependency</string> <string>74.IBEditorWindowLastContentRect</string> <string>74.IBPluginDependency</string> - <string>747.IBViewBoundsToFrameTransform</string> - <string>748.CustomClassName</string> <string>768.IBPluginDependency</string> <string>768.IBViewBoundsToFrameTransform</string> <string>769.IBPluginDependency</string> @@ -5870,7 +5677,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{728, 128}, {540, 477}}</string> + <string>{{423, 128}, {540, 477}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableArray"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -5970,12 +5777,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{389, 7}, {443, 849}}</string> + <string>{{389, 162}, {443, 754}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <object class="NSAffineTransform"> - <bytes key="NSTransformStruct">P4AAAL+AAABCMAAAwggAAA</bytes> - </object> - <string>HyperlinkButtonCell</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSAffineTransform"> <bytes key="NSTransformStruct">P4AAAL+AAABDPgAAwuQAAA</bytes> diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd index 864d189..3e5fa8a 100644 --- a/chrome/app/resources/locale_settings.grd +++ b/chrome/app/resources/locale_settings.grd @@ -525,11 +525,6 @@ http://tools.google.com/chrome/intl/[GRITLANGCODE]/welcome.html </message> - <!-- The URL for the "Learn more" page for the Chrome Web Apps section under Options.--> - <message name="IDS_LEARN_MORE_BACKGROUND_MODE_URL" translateable="false"> - http://www.google.com/support/chrome/bin/answer.py?answer=188022&hl=[GRITLANGCODE] - </message> - <!-- The URL for the "Learn more" page for the usage/crash reporting option in the first run dialog. --> <message name="IDS_LEARN_MORE_REPORTING_URL" translateable="false"> http://www.google.com/support/chrome/bin/answer.py?answer=96817&hl=[GRITLANGCODE] diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc index 7d883b2..8f78dfb 100644 --- a/chrome/browser/background_mode_manager.cc +++ b/chrome/browser/background_mode_manager.cc @@ -196,10 +196,6 @@ BackgroundModeManager::BackgroundModeManager(Profile* profile, registrar_.Add(this, NotificationType::APP_TERMINATING, NotificationService::AllSources()); - // Listen for changes to the background mode preference. - pref_registrar_.Init(profile_->GetPrefs()); - pref_registrar_.Add(prefs::kBackgroundModeEnabled, this); - applications_.AddObserver(this); } @@ -213,10 +209,6 @@ BackgroundModeManager::~BackgroundModeManager() { EndBackgroundMode(); } -bool BackgroundModeManager::IsBackgroundModeEnabled() { - return profile_->GetPrefs()->GetBoolean(prefs::kBackgroundModeEnabled); -} - bool BackgroundModeManager::IsLaunchOnStartupResetAllowed() { return profile_->GetPrefs()->GetBoolean(prefs::kLaunchOnStartupResetAllowed); } @@ -239,8 +231,7 @@ void BackgroundModeManager::Observe(NotificationType type, // don't want to stomp on user choice every time we start and load // registered extensions. #if !defined(OS_MACOSX) - EnableLaunchOnStartup(IsBackgroundModeEnabled() && - background_app_count_ > 0); + EnableLaunchOnStartup(background_app_count_ > 0); #endif break; case NotificationType::EXTENSION_LOADED: @@ -280,11 +271,6 @@ void BackgroundModeManager::Observe(NotificationType type, // try to re-enter/exit background mode again. registrar_.RemoveAll(); break; - case NotificationType::PREF_CHANGED: - DCHECK(0 == Details<std::string>(details).ptr()->compare( - prefs::kBackgroundModeEnabled)); - OnBackgroundModePrefChanged(); - break; default: NOTREACHED(); break; @@ -302,28 +288,11 @@ void BackgroundModeManager::EndKeepAliveForStartup() { } } -void BackgroundModeManager::OnBackgroundModePrefChanged() { - // Background mode has been enabled/disabled in preferences, so update our - // state accordingly. - if (IsBackgroundModeEnabled() && !in_background_mode_ && - background_app_count_ > 0) { - // We should be in background mode, but we're not, so switch to background - // mode. - EnableLaunchOnStartup(true); - StartBackgroundMode(); - } - if (!IsBackgroundModeEnabled() && in_background_mode_) { - // We're in background mode, but we shouldn't be any longer. - EnableLaunchOnStartup(false); - EndBackgroundMode(); - } -} - void BackgroundModeManager::OnBackgroundAppLoaded() { // When a background app loads, increment our count and also enable // KeepAlive mode if the preference is set. background_app_count_++; - if (background_app_count_ == 1 && IsBackgroundModeEnabled()) + if (background_app_count_ == 1) StartBackgroundMode(); } @@ -347,7 +316,7 @@ void BackgroundModeManager::OnBackgroundAppUnloaded() { // KeepAlive mode if appropriate. background_app_count_--; DCHECK(background_app_count_ >= 0); - if (background_app_count_ == 0 && IsBackgroundModeEnabled()) + if (background_app_count_ == 0) EndBackgroundMode(); } @@ -364,14 +333,14 @@ void BackgroundModeManager::EndBackgroundMode() { void BackgroundModeManager::OnBackgroundAppInstalled() { // We're installing a background app. If this is the first background app // being installed, make sure we are set to launch on startup. - if (IsBackgroundModeEnabled() && background_app_count_ == 0) + if (background_app_count_ == 0) EnableLaunchOnStartup(true); } void BackgroundModeManager::OnBackgroundAppUninstalled() { // When uninstalling a background app, disable launch on startup if // we have no more background apps. - if (IsBackgroundModeEnabled() && background_app_count_ == 0) + if (background_app_count_ == 0) EnableLaunchOnStartup(false); } @@ -581,6 +550,5 @@ Browser* BackgroundModeManager::GetBrowserWindow() { // static void BackgroundModeManager::RegisterUserPrefs(PrefService* prefs) { - prefs->RegisterBooleanPref(prefs::kBackgroundModeEnabled, true); prefs->RegisterBooleanPref(prefs::kLaunchOnStartupResetAllowed, false); } diff --git a/chrome/browser/background_mode_manager.h b/chrome/browser/background_mode_manager.h index 666b4f7..dbae6e5 100644 --- a/chrome/browser/background_mode_manager.h +++ b/chrome/browser/background_mode_manager.h @@ -27,10 +27,9 @@ class StatusTray; // are no open browser windows. // // Chrome enters background mode whenever there is an application with the -// "background" permission installed and the appropriate user preference is -// set (kBackgroundModeEnabled). This class monitors the set of installed/loaded -// extensions to ensure that Chrome enters/exits background mode at the -// appropriate time. +// "background" permission installed. This class monitors the set of +// installed/loaded extensions to ensure that Chrome enters/exits background +// mode at the appropriate time. // // When Chrome is in background mode, it will continue running even after the // last browser window is closed, until the user explicitly exits the app. @@ -94,12 +93,6 @@ class BackgroundModeManager // launch-on-startup is disabled if appropriate. void OnBackgroundAppUninstalled(); - // Invoked when the kBackgroundModeEnabled preference has changed. - void OnBackgroundModePrefChanged(); - - // Returns true if the background mode preference is enabled - bool IsBackgroundModeEnabled(); - // Returns true if chrome has set "launch on startup" property for itself // earlier and is allowed to reset it later, reducing likelihood of // overriding user choices. @@ -183,9 +176,6 @@ class BackgroundModeManager // Reference to our status icon (if any) - owned by the StatusTray. StatusIcon* status_icon_; - // Ensure observed preferences are properly cleaned up. - PrefChangeRegistrar pref_registrar_; - DISALLOW_COPY_AND_ASSIGN(BackgroundModeManager); }; diff --git a/chrome/browser/background_mode_manager_unittest.cc b/chrome/browser/background_mode_manager_unittest.cc index cd87ce5..989c72d 100644 --- a/chrome/browser/background_mode_manager_unittest.cc +++ b/chrome/browser/background_mode_manager_unittest.cc @@ -66,52 +66,3 @@ TEST_F(BackgroundModeManagerTest, BackgroundAppInstallUninstall) { manager.OnBackgroundAppUnloaded(); manager.OnBackgroundAppUninstalled(); } - -TEST_F(BackgroundModeManagerTest, BackgroundPrefDisabled) { - InSequence s; - TestingProfile profile; - profile.GetPrefs()->SetBoolean(prefs::kBackgroundModeEnabled, false); - TestBackgroundModeManager manager(&profile, command_line_.get()); - EXPECT_CALL(manager, CreateStatusTrayIcon()).Times(0); - // Should not change launch on startup status when installing/uninstalling - // if background mode is disabled. - EXPECT_CALL(manager, EnableLaunchOnStartup(true)).Times(0); - manager.OnBackgroundAppInstalled(); - manager.OnBackgroundAppLoaded(); - EXPECT_FALSE(BrowserList::WillKeepAlive()); - manager.OnBackgroundAppUnloaded(); - manager.OnBackgroundAppUninstalled(); -} - -TEST_F(BackgroundModeManagerTest, BackgroundPrefDynamicDisable) { - InSequence s; - TestingProfile profile; - TestBackgroundModeManager manager(&profile, command_line_.get()); - EXPECT_CALL(manager, EnableLaunchOnStartup(true)); - EXPECT_CALL(manager, CreateStatusTrayIcon()); - EXPECT_CALL(manager, EnableLaunchOnStartup(false)); - EXPECT_CALL(manager, RemoveStatusTrayIcon()); - manager.OnBackgroundAppInstalled(); - manager.OnBackgroundAppLoaded(); - EXPECT_TRUE(BrowserList::WillKeepAlive()); - // Disable status on the fly. - profile.GetPrefs()->SetBoolean(prefs::kBackgroundModeEnabled, false); - // Manually notify background mode manager that pref has changed - manager.OnBackgroundModePrefChanged(); - EXPECT_FALSE(BrowserList::WillKeepAlive()); -} - -TEST_F(BackgroundModeManagerTest, BackgroundPrefDynamicEnable) { - InSequence s; - TestingProfile profile; - TestBackgroundModeManager manager(&profile, command_line_.get()); - profile.GetPrefs()->SetBoolean(prefs::kBackgroundModeEnabled, false); - EXPECT_CALL(manager, EnableLaunchOnStartup(true)); - EXPECT_CALL(manager, CreateStatusTrayIcon()); - manager.OnBackgroundAppInstalled(); - manager.OnBackgroundAppLoaded(); - EXPECT_FALSE(BrowserList::WillKeepAlive()); - // Enable status on the fly. - profile.GetPrefs()->SetBoolean(prefs::kBackgroundModeEnabled, true); - EXPECT_TRUE(BrowserList::WillKeepAlive()); -} diff --git a/chrome/browser/cocoa/preferences_window_controller.h b/chrome/browser/cocoa/preferences_window_controller.h index 51aa79b..cfec955 100644 --- a/chrome/browser/cocoa/preferences_window_controller.h +++ b/chrome/browser/cocoa/preferences_window_controller.h @@ -144,11 +144,6 @@ class ProfileSyncService; BOOL safeBrowsingEnabled_; BOOL metricsReportingEnabled_; BOOL proxiesConfigureButtonEnabled_; - IBOutlet NSTextField* backgroundModeTitle_; - IBOutlet NSButton* backgroundModeCheckbox_; - IBOutlet NSTextField* backgroundModeDescription_; - IBOutlet NSButton* backgroundModeLearnMore_; - BooleanPrefMember backgroundModeEnabled_; } // Designated initializer. |profile| should not be NULL. @@ -194,7 +189,6 @@ class ProfileSyncService; - (IBAction)changeFontAndLanguageSettings:(id)sender; - (IBAction)openProxyPreferences:(id)sender; - (IBAction)showCertificates:(id)sender; -- (IBAction)backgroundModeLearnMore:(id)sender; - (IBAction)resetToDefaults:(id)sender; // When a toolbar button is clicked diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index fb59ff1..1e556a8 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -399,7 +399,6 @@ CGFloat AutoSizeUnderTheHoodContent(NSView* view, - (void)setFileHandlerUIEnabled:(BOOL)value; - (void)setTranslateEnabled:(BOOL)value; - (void)setTabsToLinks:(BOOL)value; -- (void)setBackgroundModeEnabled:(BOOL)value; - (void)displayPreferenceViewForPage:(OptionsPage)page animate:(BOOL)animate; - (void)resetSubViews; @@ -602,15 +601,6 @@ class ManagedPrefsBannerState : public policy::ManagedPrefsBannerBase { RemoveViewFromView(underTheHoodContentView_, enableLoggingCheckbox_); #endif // !defined(GOOGLE_CHROME_BUILD) - // If BackgroundMode is not enabled, hide the related prefs UI. - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableBackgroundMode)) { - RemoveViewFromView(underTheHoodContentView_, backgroundModeTitle_); - RemoveViewFromView(underTheHoodContentView_, backgroundModeCheckbox_); - RemoveViewFromView(underTheHoodContentView_, backgroundModeDescription_); - RemoveViewFromView(underTheHoodContentView_, backgroundModeLearnMore_); - } - // There are four problem children within the groups: // Basics - Default Browser // Personal Stuff - Sync @@ -877,8 +867,6 @@ class ManagedPrefsBannerState : public policy::ManagedPrefsBannerBase { autoOpenFiles_.Init( prefs::kDownloadExtensionsToOpen, prefs_, observer_.get()); translateEnabled_.Init(prefs::kEnableTranslate, prefs_, observer_.get()); - backgroundModeEnabled_.Init(prefs::kBackgroundModeEnabled, prefs_, - observer_.get()); tabsToLinks_.Init(prefs::kWebkitTabsToLinks, prefs_, observer_.get()); // During unit tests, there is no local state object, so we fall back to @@ -1531,10 +1519,6 @@ const int kDisabledIndex = 1; else if (*prefName == prefs::kEnableTranslate) { [self setTranslateEnabled:translateEnabled_.GetValue() ? YES : NO]; } - else if (*prefName == prefs::kBackgroundModeEnabled) { - [self setBackgroundModeEnabled:backgroundModeEnabled_.GetValue() ? - YES : NO]; - } else if (*prefName == prefs::kWebkitTabsToLinks) { [self setTabsToLinks:tabsToLinks_.GetValue() ? YES : NO]; } @@ -1598,12 +1582,6 @@ const int kDisabledIndex = 1; browser::ShowOptionsURL(profile_, url); } -- (IBAction)backgroundModeLearnMore:(id)sender { - browser::ShowOptionsURL( - profile_, - GURL(l10n_util::GetStringUTF16(IDS_LEARN_MORE_BACKGROUND_MODE_URL))); -} - - (IBAction)resetAutoOpenFiles:(id)sender { profile_->GetDownloadManager()->download_prefs()->ResetAutoOpen(); [self recordUserAction:UserMetricsAction("Options_ResetAutoOpenFiles")]; @@ -1793,19 +1771,6 @@ const int kDisabledIndex = 1; translateEnabled_.SetValue(value); } -- (BOOL)backgroundModeEnabled { - return backgroundModeEnabled_.GetValue(); -} - -- (void)setBackgroundModeEnabled:(BOOL)value { - if (value) { - [self recordUserAction:UserMetricsAction("Options_BackgroundMode_Enable")]; - } else { - [self recordUserAction:UserMetricsAction("Options_BackgroundMode_Disable")]; - } - backgroundModeEnabled_.SetValue(value); -} - - (BOOL)tabsToLinks { return tabsToLinks_.GetValue(); } diff --git a/chrome/browser/dom_ui/options/advanced_options_handler.cc b/chrome/browser/dom_ui/options/advanced_options_handler.cc index 4434551..2078368 100644 --- a/chrome/browser/dom_ui/options/advanced_options_handler.cc +++ b/chrome/browser/dom_ui/options/advanced_options_handler.cc @@ -135,19 +135,6 @@ void AdvancedOptionsHandler::GetLocalizedValues( l10n_util::GetStringUTF16(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE)); localized_strings->SetString("translateEnableTranslate", l10n_util::GetStringUTF16(IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE)); - // Add ChromeApps preferences if background mode is runtime-enabled. - bool background_mode_enabled = CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableBackgroundMode); - localized_strings->SetString("enable-background-mode", - background_mode_enabled ? "true" : "false"); - localized_strings->SetString("advancedSectionTitleChromeApps", - l10n_util::GetStringUTF16( - IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS)); - localized_strings->SetString("chromeAppsEnableBackgroundMode", - l10n_util::GetStringUTF16( - IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE)); - localized_strings->SetString("chromeAppsLearnMoreBackgroundModeURL", - l10n_util::GetStringUTF16(IDS_LEARN_MORE_BACKGROUND_MODE_URL)); #if !defined(OS_CHROMEOS) // Add the cloud print proxy management ui section if it's been runtime // enabled. diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc index 26238b1..c941aab 100644 --- a/chrome/browser/gtk/options/advanced_contents_gtk.cc +++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc @@ -595,106 +595,6 @@ void TranslateSection::OnTranslateClicked(GtkWidget* widget) { } /////////////////////////////////////////////////////////////////////////////// -// ChromeAppsSection - -class ChromeAppsSection : public OptionsPageBase { - public: - explicit ChromeAppsSection(Profile* profile); - virtual ~ChromeAppsSection() {} - - GtkWidget* get_page_widget() const { - return page_; - } - - private: - // Overridden from OptionsPageBase. - virtual void NotifyPrefChanged(const std::string* pref_name); - - CHROMEGTK_CALLBACK_0(ChromeAppsSection, void, OnBackgroundModeClicked); - CHROMEGTK_CALLBACK_0(ChromeAppsSection, void, OnLearnMoreLinkClicked); - - // Preferences for this section: - BooleanPrefMember enable_background_mode_; - - // The widget containing the options for this section. - GtkWidget* page_; - - // The checkbox. - GtkWidget* background_mode_checkbox_; - - // Flag to ignore gtk callbacks while we are loading prefs, to avoid - // then turning around and saving them again. - bool pref_changing_; - - scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; - - DISALLOW_COPY_AND_ASSIGN(ChromeAppsSection); -}; - -ChromeAppsSection::ChromeAppsSection(Profile* profile) - : OptionsPageBase(profile), - pref_changing_(true) { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); - - accessible_widget_helper_.reset(new AccessibleWidgetHelper(page_, profile)); - - background_mode_checkbox_ = CreateCheckButtonWithWrappedLabel( - IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE); - gtk_box_pack_start(GTK_BOX(page_), background_mode_checkbox_, - FALSE, FALSE, 0); - g_signal_connect(background_mode_checkbox_, "clicked", - G_CALLBACK(OnBackgroundModeClickedThunk), this); - accessible_widget_helper_->SetWidgetName( - background_mode_checkbox_, - IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE); - - // Init member prefs so we can update the controls if prefs change. - enable_background_mode_.Init(prefs::kBackgroundModeEnabled, - profile->GetPrefs(), this); - - GtkWidget* learn_more_link = gtk_chrome_link_button_new( - l10n_util::GetStringUTF8(IDS_LEARN_MORE).c_str()); - // Stick it in an hbox so it doesn't expand to the whole width. - GtkWidget* learn_more_hbox = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(learn_more_hbox), learn_more_link, - FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(page_), learn_more_hbox, - FALSE, FALSE, 0); - g_signal_connect(learn_more_link, "clicked", - G_CALLBACK(OnLearnMoreLinkClickedThunk), this); - - NotifyPrefChanged(NULL); -} - -void ChromeAppsSection::NotifyPrefChanged(const std::string* pref_name) { - pref_changing_ = true; - if (!pref_name || *pref_name == prefs::kBackgroundModeEnabled) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(background_mode_checkbox_), - enable_background_mode_.GetValue()); - } - pref_changing_ = false; -} - -void ChromeAppsSection::OnBackgroundModeClicked(GtkWidget* widget) { - if (pref_changing_) - return; - bool enabled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); - UserMetricsRecordAction( - enabled ? - UserMetricsAction("Options_BackgroundMode_Enable") : - UserMetricsAction("Options_BackgroundMode_Disable"), - profile()->GetPrefs()); - enable_background_mode_.SetValue(enabled); -} - -void ChromeAppsSection::OnLearnMoreLinkClicked(GtkWidget* widget) { - browser::ShowOptionsURL( - profile(), - GURL(l10n_util::GetStringUTF8(IDS_LEARN_MORE_BACKGROUND_MODE_URL))); -} - - -/////////////////////////////////////////////////////////////////////////////// // PrivacySection class PrivacySection : public OptionsPageBase { @@ -1366,13 +1266,5 @@ void AdvancedContentsGtk::Init() { l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), security_section_->get_page_widget(), false); - // Add ChromeApps preferences if background mode is runtime-enabled. - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableBackgroundMode)) { - chrome_apps_section_.reset(new ChromeAppsSection(profile_)); - options_builder->AddOptionGroup(l10n_util::GetStringUTF8( - IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS), - chrome_apps_section_->get_page_widget(), false); - } page_ = options_builder->get_page_widget(); } diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.h b/chrome/browser/gtk/options/advanced_contents_gtk.h index f39d6cc..28eb3bd 100644 --- a/chrome/browser/gtk/options/advanced_contents_gtk.h +++ b/chrome/browser/gtk/options/advanced_contents_gtk.h @@ -12,7 +12,6 @@ #include "base/scoped_ptr.h" class Profile; -class ChromeAppsSection; class DownloadSection; class NetworkSection; class PrivacySection; @@ -36,7 +35,6 @@ class AdvancedContentsGtk { Profile* profile_; // The sections of the page. - scoped_ptr<ChromeAppsSection> chrome_apps_section_; scoped_ptr<DownloadSection> download_section_; scoped_ptr<NetworkSection> network_section_; scoped_ptr<TranslateSection> translate_section_; diff --git a/chrome/browser/options_util.cc b/chrome/browser/options_util.cc index 933ef63..5d46ab5 100644 --- a/chrome/browser/options_util.cc +++ b/chrome/browser/options_util.cc @@ -27,7 +27,6 @@ void OptionsUtil::ResetToDefaults(Profile* profile) { const char* kUserPrefs[] = { prefs::kAcceptLanguages, prefs::kAlternateErrorPagesEnabled, - prefs::kBackgroundModeEnabled, prefs::kClearSiteDataOnExit, prefs::kCookieBehavior, prefs::kDefaultCharset, diff --git a/chrome/browser/resources/options.html b/chrome/browser/resources/options.html index bf43df2..c9e6db7 100644 --- a/chrome/browser/resources/options.html +++ b/chrome/browser/resources/options.html @@ -1,7 +1,6 @@ <!DOCTYPE HTML> <html i18n-values="dir:textdirection; - enable-background-mode:enable-background-mode; enable-cloud-print-proxy:enable-cloud-print-proxy" id="t"> <head> diff --git a/chrome/browser/resources/options/advanced_options.html b/chrome/browser/resources/options/advanced_options.html index f58d9af..92da57c 100644 --- a/chrome/browser/resources/options/advanced_options.html +++ b/chrome/browser/resources/options/advanced_options.html @@ -176,21 +176,6 @@ </if> </div> </section> - <section id="background-mode-section"> - <h3 i18n-content="advancedSectionTitleChromeApps"></h3> - <div> - <label class="checkbox"> - <input pref="background_mode.enabled" - metric="Options_BackgroundMode" type="checkbox"> - <span i18n-content="chromeAppsEnableBackgroundMode"></span> - </label> - <div> - <a target="_blank" - i18n-content="learnMore" - i18n-values="href:chromeAppsLearnMoreBackgroundModeURL"></a> - </div> - </div> - </section> <if expr="not pp_ifdef('chromeos')"> <section id="cloud-print-proxy-section"> <h3 i18n-content="advancedSectionTitleCloudPrint"></h3> diff --git a/chrome/browser/ui/views/options/advanced_contents_view.cc b/chrome/browser/ui/views/options/advanced_contents_view.cc index e24179f..275fae7 100644 --- a/chrome/browser/ui/views/options/advanced_contents_view.cc +++ b/chrome/browser/ui/views/options/advanced_contents_view.cc @@ -1310,92 +1310,6 @@ void TranslateSection::NotifyPrefChanged(const std::string* pref_name) { } //////////////////////////////////////////////////////////////////////////////// -// ChromeAppsSection - -class ChromeAppsSection : public AdvancedSection, - public views::ButtonListener, - public views::LinkController { - public: - explicit ChromeAppsSection(Profile* profile); - virtual ~ChromeAppsSection() {} - - // Overridden from views::ButtonListener: - virtual void ButtonPressed(views::Button* sender, const views::Event& event); - // Overridden from views::LinkController: - virtual void LinkActivated(views::Link* source, int event_flags); - - protected: - // OptionsPageView overrides: - virtual void InitControlLayout(); - virtual void NotifyPrefChanged(const std::string* pref_name); - - private: - // Controls for this section: - views::Checkbox* enable_background_mode_checkbox_; - views::Link* learn_more_link_; - - // Preferences for this section: - BooleanPrefMember enable_background_mode_; - - DISALLOW_COPY_AND_ASSIGN(ChromeAppsSection); -}; - -ChromeAppsSection::ChromeAppsSection(Profile* profile) - : enable_background_mode_checkbox_(NULL), - learn_more_link_(NULL), - AdvancedSection(profile, l10n_util::GetString( - IDS_OPTIONS_ADVANCED_SECTION_TITLE_CHROME_APPS)) { -} - -void ChromeAppsSection::ButtonPressed( - views::Button* sender, const views::Event& event) { - DCHECK(sender == enable_background_mode_checkbox_); - bool enabled = enable_background_mode_checkbox_->checked(); - UserMetricsRecordAction(enabled ? - UserMetricsAction("Options_BackgroundMode_Enable") : - UserMetricsAction("Options_BackgroundMode_Disable"), - profile()->GetPrefs()); - enable_background_mode_.SetValue(enabled); -} - -void ChromeAppsSection::LinkActivated(views::Link* source, int event_flags) { - DCHECK(source == learn_more_link_); - browser::ShowOptionsURL( - profile(), - GURL(l10n_util::GetString(IDS_LEARN_MORE_BACKGROUND_MODE_URL))); -} - -void ChromeAppsSection::InitControlLayout() { - AdvancedSection::InitControlLayout(); - - GridLayout* layout = new GridLayout(contents_); - contents_->SetLayoutManager(layout); - - AddIndentedColumnSet(layout, 0); - - enable_background_mode_checkbox_ = new views::Checkbox( - l10n_util::GetString(IDS_OPTIONS_CHROME_APPS_ENABLE_BACKGROUND_MODE)); - enable_background_mode_checkbox_->set_listener(this); - AddWrappingCheckboxRow(layout, enable_background_mode_checkbox_, 0, true); - - // Init member pref so we can update the controls if prefs change. - enable_background_mode_.Init(prefs::kBackgroundModeEnabled, - profile()->GetPrefs(), this); - - // Add our link to the help center page for this feature. - learn_more_link_ = new views::Link(l10n_util::GetString(IDS_LEARN_MORE)); - learn_more_link_->SetController(this); - AddLeadingControl(layout, learn_more_link_, 0, false); -} - -void ChromeAppsSection::NotifyPrefChanged(const std::string* pref_name) { - if (!pref_name || *pref_name == prefs::kBackgroundModeEnabled) { - enable_background_mode_checkbox_->SetChecked( - enable_background_mode_.GetValue()); - } -} - -//////////////////////////////////////////////////////////////////////////////// // CloudPrintProxySection class CloudPrintProxySection : public AdvancedSection, @@ -1681,11 +1595,6 @@ void AdvancedContentsView::InitControlLayout() { layout->StartRow(0, single_column_view_set_id); layout->AddView(new CloudPrintProxySection(profile())); } - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableBackgroundMode)) { - layout->StartRow(0, single_column_view_set_id); - layout->AddView(new ChromeAppsSection(profile())); - } } //////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 531e4e9..3d967e9 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -763,10 +763,6 @@ const char kPreferencesWindowPlacement[] = "preferences.window_placement"; // renderer's in-memory cache of objects. const char kMemoryCacheSize[] = "renderer.memory_cache.size"; -// Boolean that records if chrome should run in background mode when background -// apps are installed. -const char kBackgroundModeEnabled[] = "background_mode.enabled"; - // Boolean that records if chrome has set "launch on startup" property for // itself earlier and is allowed to reset it later, reducing likelihood of // overriding user choices. diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index cd70636..f0b0d14 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -276,7 +276,6 @@ extern const char kKeywordEditorWindowPlacement[]; extern const char kPreferencesWindowPlacement[]; extern const char kMemoryCacheSize[]; -extern const char kBackgroundModeEnabled[]; extern const char kLaunchOnStartupResetAllowed[]; extern const char kDownloadDefaultDirectory[]; |