| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from page_sets import page_cycler_story | 5 from page_sets import page_cycler_story |
| 6 from telemetry import story | 6 from telemetry import story |
| 7 from telemetry.page import cache_temperature as cache_temperature_module | 7 from telemetry.page import cache_temperature as cache_temperature_module |
| 8 from telemetry.page import shared_page_state | 8 from telemetry.page import shared_page_state |
| 9 | 9 |
| 10 | 10 |
| 11 class IntlKoThViPage(page_cycler_story.PageCyclerStory): | 11 class IntlKoThViPage(page_cycler_story.PageCyclerStory): |
| 12 | 12 |
| 13 def __init__(self, url, page_set, cache_temperature=None): | 13 def __init__(self, url, page_set, cache_temperature=None): |
| 14 super(IntlKoThViPage, self).__init__( | 14 super(IntlKoThViPage, self).__init__( |
| 15 url=url, page_set=page_set, | 15 url=url, page_set=page_set, |
| 16 shared_page_state_class=shared_page_state.SharedDesktopPageState, | 16 shared_page_state_class=shared_page_state.SharedDesktopPageState, |
| 17 cache_temperature=cache_temperature, | 17 cache_temperature=cache_temperature, |
| 18 name=url) | 18 name=url) |
| 19 | 19 |
| 20 | 20 |
| 21 class IntlKoThViPageSet(story.StorySet): | 21 class IntlKoThViPageSet(story.StorySet): |
| 22 | 22 |
| 23 """ Popular pages in Korean, Thai and Vietnamese. """ | 23 """ Popular pages in Korean, Thai and Vietnamese. """ |
| 24 | 24 |
| 25 def __init__(self, cache_temperatures=None): | 25 def __init__(self, cache_temperatures=None): |
| 26 super(IntlKoThViPageSet, self).__init__( | 26 super(IntlKoThViPageSet, self).__init__( |
| 27 archive_data_file='data/intl_ko_th_vi.json', | 27 archive_data_file='data/intl_ko_th_vi.json', |
| 28 cloud_storage_bucket=story.PARTNER_BUCKET, | 28 cloud_storage_bucket=story.PARTNER_BUCKET) |
| 29 verify_names=True) | |
| 30 if cache_temperatures is None: | 29 if cache_temperatures is None: |
| 31 cache_temperatures = [cache_temperature_module.ANY] | 30 cache_temperatures = [cache_temperature_module.ANY] |
| 32 | 31 |
| 33 urls_list = [ | 32 urls_list = [ |
| 34 # Why: #7 site in Vietnam | 33 # Why: #7 site in Vietnam |
| 35 'http://us.24h.com.vn/', | 34 'http://us.24h.com.vn/', |
| 36 # Why: #6 site in Vietnam | 35 # Why: #6 site in Vietnam |
| 37 'http://vnexpress.net/', | 36 'http://vnexpress.net/', |
| 38 # Why: #18 site in Vietnam | 37 # Why: #18 site in Vietnam |
| 39 'http://vietnamnet.vn/', | 38 'http://vietnamnet.vn/', |
| (...skipping 11 matching lines...) Expand all Loading... |
| 51 'http://www.chosun.com/', | 50 'http://www.chosun.com/', |
| 52 'http://www.danawa.com/', | 51 'http://www.danawa.com/', |
| 53 # Why: #10 site in Thailand | 52 # Why: #10 site in Thailand |
| 54 'http://pantip.com/', | 53 'http://pantip.com/', |
| 55 'http://thaimisc.com/' | 54 'http://thaimisc.com/' |
| 56 ] | 55 ] |
| 57 | 56 |
| 58 for url in urls_list: | 57 for url in urls_list: |
| 59 for temp in cache_temperatures: | 58 for temp in cache_temperatures: |
| 60 self.AddStory(IntlKoThViPage(url, self, cache_temperature=temp)) | 59 self.AddStory(IntlKoThViPage(url, self, cache_temperature=temp)) |
| OLD | NEW |