how to change homepage

176 views
Skip to first unread message

Андрей Польшин

unread,
Nov 10, 2015, 8:12:11 AM11/10/15
to Chromium-dev
how to change homepage in source code cromium before build

I changed the file policy_test_cases.json

"HomepageLocation": {
    "os": ["win", "linux", "mac", "chromeos"],
    "can_be_recommended": true,
    "test_policy": { "HomepageLocation": "http://chromium.org" },
    "pref_mappings": [
      { "pref": "homepage",
        "indicator_tests": [
          { "policy": { "HomepageIsNewTabPage": true, "HomepageLocation": "http://chromium.org" } },
          { "policy": { "HomepageIsNewTabPage": true, "HomepageLocation": "http://chromium.org" },
            "readonly": true
          }
        ]
      }
    ]
  },

build... no effect
I do something wrong?

Anton Vayvod

unread,
Nov 10, 2015, 8:19:13 AM11/10/15
to polshin...@gmail.com, Chromium-dev
There might be other reasons but from just reading the JSON file - shouldn't you set HomepageIsNewTabPage to false so Chrome knows to show the homepage rather than the NewTab page (the page with thumbnails and search and so on)?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Mattias Nissler

unread,
Nov 10, 2015, 8:52:11 AM11/10/15
to Anton Vayvod, polshin...@gmail.com, Chromium-dev
policy_test_case.json is a file that drives a test case - changing things there will have no effect on the browser. The homepage URL isn't hardcoded anywhere, so you can't change it via a simple string change. Here's a code pointer to one of the central places dealing with homepage preferences, which you may find useful: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/prefs/session_startup_pref.cc

Андрей Польшин

unread,
Nov 10, 2015, 12:20:35 PM11/10/15
to Chromium-dev, ava...@google.com, polshin...@gmail.com
I'm new to C ++, you can give more information, but I have searched through everything and where it is not what is not ...

вторник, 10 ноября 2015 г., 18:52:11 UTC+5 пользователь Mattias Nissler написал:

Андрей Польшин

unread,
Nov 10, 2015, 12:21:41 PM11/10/15
to Chromium-dev, polshin...@gmail.com, ava...@chromium.org
Антон можно по русски? меня интересует где тогда капать и как мне тестить политику без сборки браузера... я под виндой...

вторник, 10 ноября 2015 г., 18:19:13 UTC+5 пользователь Anton Vayvod написал:

Thiago Farina

unread,
Nov 10, 2015, 5:16:07 PM11/10/15
to polshin...@gmail.com, Chromium-dev, Mattias Nissler
On Tue, Nov 10, 2015 at 3:20 PM, Андрей Польшин <polshin...@gmail.com> wrote:
I'm new to C ++, you can give more information, but I have searched through everything and where it is not what is not ...

Hum, what more information do you need?

Are you not sure what you should change in that source file?

Do you want to change the url of homepage? I think you might look at prefs::kRestoreOnStartup.

--
Thiago Farina
Reply all
Reply to author
Forward
0 new messages