Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/plugin/PluginClass.cpp

Issue 11043057: First run page triggering (Closed)
Left Patch Set: All changes Created July 25, 2013, 2:02 p.m.
Right Patch Set: Minor refactoring. Renaming and a small cleanup. Created July 26, 2013, 12:05 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/PluginClass.h ('k') | src/plugin/PluginSettings.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 #include "PluginStdAfx.h" 1 #include "PluginStdAfx.h"
2 2
3 #include "PluginClass.h" 3 #include "PluginClass.h"
4 #include "PluginSettings.h" 4 #include "PluginSettings.h"
5 #include "PluginSystem.h" 5 #include "PluginSystem.h"
6 #ifdef SUPPORT_FILTER 6 #ifdef SUPPORT_FILTER
7 #include "PluginFilter.h" 7 #include "PluginFilter.h"
8 #endif 8 #endif
9 #include "PluginMimeFilterClient.h" 9 #include "PluginMimeFilterClient.h"
10 #include "PluginClient.h" 10 #include "PluginClient.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 return true; 1002 return true;
1003 } 1003 }
1004 1004
1005 void CPluginClass::FirstRunThread() 1005 void CPluginClass::FirstRunThread()
1006 { 1006 {
1007 CoInitialize(NULL); 1007 CoInitialize(NULL);
1008 VARIANT vFlags; 1008 VARIANT vFlags;
1009 vFlags.vt = VT_I4; 1009 vFlags.vt = VT_I4;
1010 vFlags.intVal = navOpenInNewTab; 1010 vFlags.intVal = navOpenInNewTab;
1011 1011
1012 CComBSTR bTest = CComBSTR(UserSettingsFirstRunPageUrl().c_str()); 1012 CComBSTR navigatePath = CComBSTR(FirstRunPageFileUrl().c_str());
1013 1013
1014 //Try 10 times, or until successful 1014 HRESULT hr = GetAsyncBrowser()->Navigate(navigatePath, &vFlags, NULL, NULL, NU LL);
1015 int numberOfAttempts = 0;
1016 HRESULT hr = S_FALSE;
1017 hr = GetAsyncBrowser()->Navigate(bTest, &vFlags, NULL, NULL, NULL);
1018 if (FAILED(hr)) 1015 if (FAILED(hr))
1019 { 1016 {
1020 vFlags.intVal = navOpenInNewWindow; 1017 vFlags.intVal = navOpenInNewWindow;
1021 hr = GetAsyncBrowser()->Navigate(bTest, &vFlags, NULL, NULL, NULL); 1018 hr = GetAsyncBrowser()->Navigate(navigatePath, &vFlags, NULL, NULL, NULL);
1022 } 1019 }
1023
1024 1020
1025 if (FAILED(hr)) 1021 if (FAILED(hr))
1026 { 1022 {
1027 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_NAVIGATION, PLUGIN_ERROR_NAVIGATION_WELCOME , "Navigation::Welcome page failed") 1023 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_NAVIGATION, PLUGIN_ERROR_NAVIGATION_WELCOME , "Navigation::Welcome page failed")
1028 } 1024 }
1029 } 1025 }
1030 void CPluginClass::CloseTheme() 1026 void CPluginClass::CloseTheme()
1031 { 1027 {
1032 if (m_hTheme) 1028 if (m_hTheme)
1033 { 1029 {
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 } 1903 }
1908 } 1904 }
1909 } 1905 }
1910 1906
1911 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1907 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1912 } 1908 }
1913 1909
1914 return hTabWnd; 1910 return hTabWnd;
1915 1911
1916 } 1912 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld