Closed
Bug 173267
Opened 22 years ago
Closed 22 years ago
Add a method to get the NCProfileName from the registry
Categories
(Core Graveyard :: Profile: BackEnd, defect)
Core Graveyard
Profile: BackEnd
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: srilatha, Assigned: srilatha)
Details
Attachments
(1 file, 2 obsolete files)
3.29 KB,
patch
|
ccarlen
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
Add a method to nsIProfileInternal.idl to get the NCProfileName from the registry. This is needed for bugscape bug 19946 http://bugscape.netscape.com/show_bug.cgi?id=19946
Assignee | ||
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
Comment on attachment 102164 [details] [diff] [review] patch v1 What I'd rather do is to provide a "getRegStrings" to match "setRegStrings" Saying that NCProfileName is "the" reg string is misleading since there are quite a few strings stored in a profile registry entry. Better yet - since most callers may only want 1 string, make both the getter and the setter take a param to specify which string, like: AString getRegString(in AString profileName, in AString stringID); Same thing for setRegString. Then it's flexible and uses nsAString types.
Attachment #102164 -
Flags: needs-work+
Assignee | ||
Comment 3•22 years ago
|
||
I have changed the method to getRegStrings. Since i am going to check this into the branch, and if we change SetRegStrings we will have to change the calling code too, and i am not comfortable changing it now. I will file another bug to change these to getRegString and setRegString which takes a parameter for the stringId.
Assignee | ||
Comment 4•22 years ago
|
||
Attachment #102164 -
Attachment is obsolete: true
Comment 5•22 years ago
|
||
Don't make GetRegStrings() return a ';' delimited concatenation of strings. That would require making ';' an illegal char in any string stored there, plus putting the burden of parsing on any caller - not good. If you don't want to take the original suggestion (getting/setting one named string at a time), make getRegStrings() return the same 4 separate strings as setRegStrings().
Assignee | ||
Comment 6•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #102184 -
Attachment is obsolete: true
Comment 7•22 years ago
|
||
Comment on attachment 102244 [details] [diff] [review] patch v3 >+ >+ nsresult rv = NS_OK; >+ ProfileStruct* profileVal; >+ >+ rv = gProfileDataAccess->GetValue(aProfileName, &profileVal); >+ NS_ENSURE_SUCCESS(rv,rv); >+ NS_ENSURE_TRUE(profileVal, NS_ERROR_FAILURE); I think just the NS_ENSURE_TRUE is enough. I'd drop the rv test. >+ >+ if (!profileVal->NCHavePregInfo.IsEmpty()) { >+ *aRegString = ToNewUnicode(profileVal->NCHavePregInfo); >+ if ( !*aRegString) >+ return NS_ERROR_OUT_OF_MEMORY; >+ } >+ else >+ *aRegString = nsnull; >+ Nit: the indentation and blank lines get inconsistent at this point. Just make the next 3 blocks match the spacing of the above block. >+ if (!profileVal->NCProfileName.IsEmpty()) { >+ *aRegName= ToNewUnicode(profileVal->NCProfileName); >+ if ( !*aRegName) >+ return NS_ERROR_OUT_OF_MEMORY; >+ } >+ else >+ *aRegName = nsnull; >+ if (!profileVal->NCEmailAddress.IsEmpty()) { r=ccarlen
Attachment #102244 -
Flags: review+
Comment 8•22 years ago
|
||
Comment on attachment 102244 [details] [diff] [review] patch v3 1) +interface nsISupportsArray; is that needed? 2) style nit: instead of: + nsresult rv = NS_OK; + ProfileStruct* profileVal; + + rv = gProfileDataAccess->GetValue(aProfileName, &profileVal); do: + ProfileStruct* profileVal; + + nsresult rv = gProfileDataAccess->GetValue(aProfileName, &profileVal); address those nits, and ccarlen's nits, and then sr=sspitzer
Attachment #102244 -
Flags: superreview+
Comment 9•22 years ago
|
||
please checkin to the MOZILLA_1_0_BRANCH branch. once there, remove the "mozilla1.0.1+" keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.2+
Assignee | ||
Comment 11•22 years ago
|
||
setting the right keyword fixed1.0.2
Keywords: fixed1.0.1 → fixed1.0.2
Comment 12•22 years ago
|
||
Does anyone have steps to verify this?
Assignee | ||
Comment 13•22 years ago
|
||
kTrina, this a backend change. One way you can verify this. Create a profile using 7.0 Rtm Activate a screen name(for ex: test). run the daily branch build with that profile The activation dialog should comeup and the screeen name field should be pre-filled with the screen name (test in our ex). I think Grace has already tested this scenario.
Comment 14•22 years ago
|
||
I test this daily and it is ok will mark verified1.0.2
Keywords: fixed1.0.2 → verified1.0.2
Comment 15•22 years ago
|
||
Removing bbird metabug blockage as bbird has shipped.
No longer blocks: blackbird
Comment 16•22 years ago
|
||
Related changes landed on the trunk. Marking Fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
QA Contact: ktrina → gbush
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•